Changeset 133667 in webkit


Ignore:
Timestamp:
Nov 6, 2012 2:00:23 PM (11 years ago)
Author:
commit-queue@webkit.org
Message:

[BlackBerry] Pushing window.external.* events to webplatform
https://bugs.webkit.org/show_bug.cgi?id=101386

Patch by Otto Derek Cheung <otcheung@rim.com> on 2012-11-06
Reviewed by Rob Buis.

Adding calls to trigger window.external events so we can handle them on the
browser side.

PR 170059

  • Api/WebPageClient.h:
  • WebCoreSupport/ChromeClientBlackBerry.cpp:

(WebCore::ChromeClientBlackBerry::addSearchProvider):
(WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):

Location:
trunk/Source/WebKit/blackberry
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/blackberry/Api/WebPageClient.h

    r133629 r133667  
    263263    virtual void closePopupWebView() = 0;
    264264
     265    virtual void addSearchProvider(const Platform::String&) = 0;
     266    virtual int  isSearchProviderInstalled(const Platform::String&) = 0;
     267
    265268    // Match with ChromeClient::CustomHandlersState.
    266269    enum ProtocolHandlersState {
  • trunk/Source/WebKit/blackberry/ChangeLog

    r133634 r133667  
     12012-11-06  Otto Derek Cheung  <otcheung@rim.com>
     2
     3        [BlackBerry] Pushing window.external.* events to webplatform
     4        https://bugs.webkit.org/show_bug.cgi?id=101386
     5
     6        Reviewed by Rob Buis.
     7
     8        Adding calls to trigger window.external events so we can handle them on the
     9        browser side.
     10
     11        PR 170059
     12
     13        * Api/WebPageClient.h:
     14        * WebCoreSupport/ChromeClientBlackBerry.cpp:
     15        (WebCore::ChromeClientBlackBerry::addSearchProvider):
     16        (WebCore::ChromeClientBlackBerry::isSearchProviderInstalled):
     17
    1182012-11-06  Otto Derek Cheung  <otcheung@rim.com>
    219
  • trunk/Source/WebKit/blackberry/WebCoreSupport/ChromeClientBlackBerry.cpp

    r133094 r133667  
    839839void ChromeClientBlackBerry::addSearchProvider(const BlackBerry::Platform::String& originURL, const BlackBerry::Platform::String& newURL)
    840840{
    841     notImplemented();
     841    // See if the input URL host matches of the origin host.
     842    KURL originHost = KURL(KURL(), originURL);
     843    KURL url = KURL(KURL(), newURL);
     844    if (url.isValid() && originHost.host() == url.host())
     845        m_webPagePrivate->client()->addSearchProvider(newURL);
    842846}
    843847
     
    848852//    1 - One or more installed search engines match url, but none are the user's default search engine.
    849853//    2 - The user's default search engine matches url.
     854
     855    // See if the input URL host matches of the origin host.
     856    KURL originHost = KURL(KURL(), originURL);
     857    KURL url = KURL(KURL(), newURL);
     858    if (url.isValid() && originHost.host() == url.host())
     859        return m_webPagePrivate->client()->isSearchProviderInstalled(newURL);
    850860    return 0;
    851861}
Note: See TracChangeset for help on using the changeset viewer.