1/* 2 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19#include "config.h" 20#include "NavigatorContentUtilsClientBlackBerry.h" 21 22#if ENABLE(NAVIGATOR_CONTENT_UTILS) 23 24#include "WebPage_p.h" 25 26namespace WebCore { 27 28NavigatorContentUtilsClientBlackBerry::NavigatorContentUtilsClientBlackBerry(BlackBerry::WebKit::WebPagePrivate* webPagePrivate) 29 : m_webPagePrivate(webPagePrivate) 30{ 31} 32 33void NavigatorContentUtilsClientBlackBerry::registerProtocolHandler(const String& scheme, const String& baseURL, const String& url, const String& title) 34{ 35 m_webPagePrivate->m_client->registerProtocolHandler(scheme, baseURL, url, title); 36} 37 38 39#if ENABLE(CUSTOM_SCHEME_HANDLER) 40NavigatorContentUtilsClient::CustomHandlersState NavigatorContentUtilsClientBlackBerry::isProtocolHandlerRegistered(const String& scheme, const String& baseURL, const String& url) 41{ 42 return static_cast<CustomHandlersState>(m_webPagePrivate->m_client->isProtocolHandlerRegistered(scheme, baseURL, url)); 43} 44 45void NavigatorContentUtilsClientBlackBerry::unregisterProtocolHandler(const String& scheme, const String& baseURL, const String& url) 46{ 47 m_webPagePrivate->m_client->unregisterProtocolHandler(scheme, baseURL, url); 48} 49#endif 50 51} 52 53#endif // ENABLE(NAVIGATOR_CONTENT_UTILS) 54