⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 101307 in webkit


Ignore:
Timestamp:
Nov 28, 2011, 5:08:35 PM (15 years ago)
Author:
jonlee@apple.com
Message:

Create skeleton framework for notifications support in WK2
https://bugs.webkit.org/show_bug.cgi?id=73253
<rdar://problem/10356943>

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.

Source/WebCore:

Reviewed by Sam Weinig.

Some refactoring was done to make notifications follow a similar pattern to our other clients, like
geolocation and context menu.

  • Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
  • WebCore.xcodeproj/project.pbxproj: Adding new NotificationController class, and exposing

Notification and NotificationController as private headers.

  • Target.pri: Ditto.
  • WebCore.gypi: Ditto.
  • notifications/NotificationContents.h: Converted class to struct. Members need to be accessible

in order to do WK2 argument encoding.
(WebCore::NotificationContents::NotificationContents):

  • notifications/Notification.cpp: Update style of entire file.

(WebCore::Notification::Notification): Added default constructor (for WK2), and minor refactoring
with NotificationContents.

  • notifications/Notification.h: Added set methods for WK2 serialization. Also, update indenting.

(WebCore::Notification::setHTML): Added.
(WebCore::Notification::setURL): Added.
(WebCore::Notification::contents): Added const version for WK2.

  • notifications/NotificationCenter.h: Update style.
  • notifications/NotificationController.cpp: Added.

(WebCore::NotificationController::NotificationController):
(WebCore::NotificationController::~NotificationController):

  • notifications/NotificationController.h: Added.

(WebCore::NotificationController::client):

  • notifications/NotificationPresenter.h: This acts like a client, and should probably be renamed as such.

Removed ifdef for exposure to WK2.
(WebCore::NotificationPresenter::~NotificationPresenter): Moved as protected instead of public.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::webkitNotifications): We move the request for the notification client from the chrome
to the controller.

  • page/Page.cpp:

(WebCore::Page::Page): The page now owns a notification controller.
(WebCore::Page::PageClients::PageClients): Add notification client as a page client.

  • page/Page.h:

(WebCore::Page::notificationController): Retrieve the notification controller.

  • page/ChromeClient.h: We move the request for the notification client from the chrome to the controller.

Remove notificationPresenter().

  • page/Chrome.cpp: Remove notificationPresenter().
  • page/Chrome.h: Remove notificationPresenter().
  • loader/EmptyClients.h: Remove notificationPresenter().

Source/WebKit:

Reviewed by Sam Weinig.

  • WebKit.xcodeproj/project.pbxproj: Add WebNotificationClient class.

Source/WebKit/chromium:

Reviewed by Sam Weinig.

Remove notificationPresenter() from the chrome client, since it is now managed by
the notification controller.

  • src/ChromeClientImpl.cpp:
  • src/ChromeClientImpl.h:
  • src/WebNotification.cpp:

(WebKit::WebNotification::title): Refactoring with NotificationContents conversion to struct.
(WebKit::WebNotification::body): Ditto.

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::WebViewImpl): Set notification client in web view's page clients.

Source/WebKit/mac:

Reviewed by Sam Weinig.

  • Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
  • WebCoreSupport/WebNotificationClient.h: Added.

(WebNotificationClient::webView):

  • WebCoreSupport/WebNotificationClient.mm: Added. Implemented as stubs for now.

(WebNotificationClient::WebNotificationClient):
(WebNotificationClient::show):
(WebNotificationClient::cancel):
(WebNotificationClient::notificationObjectDestroyed):
(WebNotificationClient::requestPermission):
(WebNotificationClient::cancelRequestsForPermission):
(WebNotificationClient::checkPermission):

  • WebView/WebView.mm: Set PageClient's notification client to an instance of this stubbed class.

Source/WebKit/qt:

Reviewed by Sam Weinig.

  • Api/qwebpage.cpp: Add notification client to pageClients.

(QWebPagePrivate::QWebPagePrivate):

  • WebCoreSupport/ChromeClientQt.cpp: Remove notification client from ChromeClient implementation.
  • WebCoreSupport/ChromeClientQt.h:
  • WebCoreSupport/NotificationPresenterClientQt.cpp: Refactor with change of NotificationContents to struct

(WebCore::NotificationWrapper::title):
(WebCore::NotificationWrapper::message):
(WebCore::NotificationPresenterClientQt::displayNotification):
(WebCore::NotificationPresenterClientQt::cancel):
(WebCore::NotificationPresenterClientQt::notificationClicked):
(WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
(WebCore::NotificationPresenterClientQt::dumpShowText):

Source/WebKit2:

Reviewed by Sam Weinig.

  • WebKit2.xcodeproj/project.pbxproj: Added classes for notification support.
  • win/WebKit2.vcproj: Ditto.
  • Target.pri: Ditto.
  • Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
  • DerivedSources.make: Add Notifications to VPATH.
  • Platform/CoreIPC/MessageID.h: List WebNotificationManagerProxy as a class with messages.
  • Scripts/webkit2/messages.py: Mark WebCore::NotificationContents as a struct.
  • Shared/API/c/WKBase.h: Map opaque types to NotificationProvider, NotificationManager, and Notification.
  • UIProcess/API/C/WKAPICast.h: Map WK types toNotificationProvider, NotificationManager, and Notification.
  • Shared/APIObject.h: Add Notification and NotificationManager as APIObjects.
  • Shared/WebCoreArgumentCoders.cpp: Added coders for KURL.

(CoreIPC::::encode):
(CoreIPC::::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/WebNotification.cpp: Added.

(WebKit::WebNotification::WebNotification):
(WebKit::WebNotification::~WebNotification):
(WebKit::WebNotification::encode):
(WebKit::WebNotification::decode):

  • UIProcess/WebNotification.h: Added.

(WebKit::WebNotification::create):
(WebKit::WebNotification::title):
(WebKit::WebNotification::body):
(WebKit::WebNotification::type):

  • UIProcess/API/C/WKNotification.cpp: Added as API.

(WKNotificationGetTypeID):
(WKNotificationCopyTitle):
(WKNotificationCopyBody):

  • UIProcess/API/C/WKNotification.h: Added as API.
  • WebProcess/Notifications/WebNotificationManager.h: Added. Contains for now show() and cancel().

The rest of the notification client methods will be added later. These two functions send messages
to the manager proxy.

  • WebProcess/Notifications/WebNotificationManager.cpp: Added.

(WebKit::WebNotificationManager::WebNotificationManager):
(WebKit::WebNotificationManager::~WebNotificationManager):
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):

  • UIProcess/WebNotificationManagerProxy.cpp: Added.

(WebKit::WebNotificationManagerProxy::create):
(WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::~WebNotificationManagerProxy):
(WebKit::WebNotificationManagerProxy::invalidate):
(WebKit::WebNotificationManagerProxy::initializeProvider):
(WebKit::WebNotificationManagerProxy::didReceiveMessage):
(WebKit::WebNotificationManagerProxy::show):
(WebKit::WebNotificationManagerProxy::cancel):

  • UIProcess/WebNotificationManagerProxy.h: Added.

(WebKit::WebNotificationManagerProxy::clearContext):
(WebKit::WebNotificationManagerProxy::type):

  • UIProcess/WebNotificationManagerProxy.messages.in: Added.
  • UIProcess/API/C/WKNotificationManager.cpp: Added.

(WKNotificationManagerGetTypeID):
(WKNotificationManagerSetProvider):

  • UIProcess/API/C/WKNotificationManager.h: Added.
  • UIProcess/WebContext.h: Add the notification manager to the web context.

(WebKit::WebContext::notificationManagerProxy): Access the manager.

  • UIProcess/WebContext.cpp:

(WebKit::WebContext::WebContext): Boilerplate for managers.
(WebKit::WebContext::~WebContext): Boilerplate for managers.
(WebKit::WebContext::disconnectProcess): Boilerplate for managers.
(WebKit::WebContext::didReceiveMessage): Forward messages to the notification manager.

  • UIProcess/API/C/WKContext.cpp: Expose as API.

(WKContextGetNotificationManager):

  • UIProcess/API/C/WKContext.h: Expose as API.
  • UIProcess/API/C/WKNotificationProvider.h: Added.
  • UIProcess/WebNotificationProvider.h: Added as APIClient.
  • UIProcess/WebNotificationProvider.cpp: Added.

(WebKit::WebNotificationProvider::show): Forward call to the client.
(WebKit::WebNotificationProvider::cancel): Forward call to the client.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::didReceiveMessage): Forward messages for notification manager to the context.

  • WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove notificationPresenter().
  • WebProcess/WebCoreSupport/WebChromeClient.h: Remove notificationPresenter().
  • WebProcess/WebCoreSupport/WebNotificationClient.h: Added. Forwards client methods to manager.
  • WebProcess/WebCoreSupport/WebNotificationClient.cpp: Added. Mostly stub implementation for now.

(WebKit::WebNotificationClient::WebNotificationClient):
(WebKit::WebNotificationClient::~WebNotificationClient):
(WebKit::WebNotificationClient::show):
(WebKit::WebNotificationClient::cancel):
(WebKit::WebNotificationClient::notificationObjectDestroyed):
(WebKit::WebNotificationClient::requestPermission):
(WebKit::WebNotificationClient::cancelRequestsForPermission):
(WebKit::WebNotificationClient::checkPermission):

  • WebProcess/WebPage/WebPage.h: Added WebNotificationClient as one of its page clients.
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage): Set the notification client to WebNotificationClient.

  • WebProcess/WebProcess.h: Added WebNotificationManager.

(WebKit::WebProcess::notificationManager):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::WebProcess): Initialize notificaton manager.

Location:
trunk/Source
Files:
21 added
59 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r101305 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
     8
    192011-11-28  Oliver Hunt  <oliver@apple.com>
    210
  • trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig

    r100226 r101307  
    9595ENABLE_MHTML = ;
    9696ENABLE_MUTATION_OBSERVERS = ;
    97 ENABLE_NOTIFICATIONS = ;
     97
     98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
     99ENABLE_NOTIFICATIONS_macosx = ;
     100
    98101ENABLE_PAGE_VISIBILITY_API = ;
    99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
  • trunk/Source/WebCore/ChangeLog

    r101302 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        Reviewed by Sam Weinig.
     8
     9        Some refactoring was done to make notifications follow a similar pattern to our other clients, like
     10        geolocation and context menu.
     11
     12        * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
     13        * WebCore.xcodeproj/project.pbxproj: Adding new NotificationController class, and exposing
     14        Notification and NotificationController as private headers.
     15        * Target.pri: Ditto.
     16        * WebCore.gypi: Ditto.
     17
     18        * notifications/NotificationContents.h: Converted class to struct. Members need to be accessible
     19        in order to do WK2 argument encoding.
     20        (WebCore::NotificationContents::NotificationContents):
     21
     22        * notifications/Notification.cpp: Update style of entire file.
     23        (WebCore::Notification::Notification): Added default constructor (for WK2), and minor refactoring
     24        with NotificationContents.
     25        * notifications/Notification.h: Added set methods for WK2 serialization. Also, update indenting.
     26        (WebCore::Notification::setHTML): Added.
     27        (WebCore::Notification::setURL): Added.
     28        (WebCore::Notification::contents): Added const version for WK2.
     29        * notifications/NotificationCenter.h: Update style.
     30
     31        * notifications/NotificationController.cpp: Added.
     32        (WebCore::NotificationController::NotificationController):
     33        (WebCore::NotificationController::~NotificationController):
     34        * notifications/NotificationController.h: Added.
     35        (WebCore::NotificationController::client):
     36        * notifications/NotificationPresenter.h: This acts like a client, and should probably be renamed as such.
     37        Removed ifdef for exposure to WK2.
     38        (WebCore::NotificationPresenter::~NotificationPresenter): Moved as protected instead of public.
     39
     40        * page/DOMWindow.cpp:
     41        (WebCore::DOMWindow::webkitNotifications):  We move the request for the notification client from the chrome
     42        to the controller.
     43        * page/Page.cpp:
     44        (WebCore::Page::Page): The page now owns a notification controller.
     45        (WebCore::Page::PageClients::PageClients): Add notification client as a page client.
     46        * page/Page.h:
     47        (WebCore::Page::notificationController): Retrieve the notification controller.
     48
     49        * page/ChromeClient.h: We move the request for the notification client from the chrome to the controller.
     50        Remove notificationPresenter().
     51        * page/Chrome.cpp: Remove notificationPresenter().
     52        * page/Chrome.h: Remove notificationPresenter().
     53        * loader/EmptyClients.h: Remove notificationPresenter().
     54
    1552011-11-28  Noel Gordon  <noel.gordon@gmail.com>
    256
  • trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig

    r100226 r101307  
    9595ENABLE_MHTML = ;
    9696ENABLE_MUTATION_OBSERVERS = ;
    97 ENABLE_NOTIFICATIONS = ;
     97
     98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
     99ENABLE_NOTIFICATIONS_macosx = ;
     100
    98101ENABLE_PAGE_VISIBILITY_API = ;
    99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
  • trunk/Source/WebCore/Target.pri

    r101295 r101307  
    945945    notifications/Notification.cpp \
    946946    notifications/NotificationCenter.cpp \
     947    notifications/NotificationController.cpp \
    947948    page/animation/AnimationBase.cpp \
    948949    page/animation/AnimationController.cpp \
     
    19861987    notifications/NotificationPresenter.h \
    19871988    notifications/NotificationContents.h \
     1989    notifications/NotificationController.h \
    19881990    page/animation/AnimationBase.h \
    19891991    page/animation/AnimationController.h \
  • trunk/Source/WebCore/WebCore.gypi

    r101295 r101307  
    584584            'loader/TextResourceDecoder.h',
    585585            'loader/ThreadableLoader.h',
     586            'loader/ThreadableLoaderClient.h',
    586587            'loader/appcache/ApplicationCache.h',
    587588            'loader/appcache/ApplicationCacheStorage.h',
     
    606607            'loader/icon/IconDatabaseClient.h',
    607608            'loader/mac/LoaderNSURLExtras.h',
     609            'notifications/NotificationContents.h',
    608610            'notifications/NotificationPresenter.h',
    609611            'page/Chrome.h',
     
    29502952            'notifications/NotificationCenter.h',
    29512953            'notifications/NotificationContents.h',
     2954            'notifications/NotificationController.h',
    29522955            'page/BarInfo.cpp',
    29532956            'page/BarInfo.h',
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r101295 r101307  
    215215                0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
    216216                0B90561B0F2578BF0095FF6A /* ThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056170F2578BE0095FF6A /* ThreadableLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
    217                 0B90561C0F2578BF0095FF6A /* ThreadableLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056180F2578BE0095FF6A /* ThreadableLoaderClient.h */; settings = {ATTRIBUTES = (); }; };
     217                0B90561C0F2578BF0095FF6A /* ThreadableLoaderClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056180F2578BE0095FF6A /* ThreadableLoaderClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
    218218                0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B90561D0F257E930095FF6A /* ThreadableLoader.cpp */; };
    219219                0B9056F80F2685F30095FF6A /* WorkerThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056F60F2685F30095FF6A /* WorkerThreadableLoader.cpp */; };
     
    803803                31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */; };
    804804                31288E750E3005D6003619AE /* WebKitCSSKeyframesRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */; };
     805                3128CA68147331520074C72A /* NotificationController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3128CA67147331520074C72A /* NotificationController.cpp */; };
     806                3128CA6B147331630074C72A /* NotificationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3128CA6A147331630074C72A /* NotificationController.h */; };
     807                312C0C41146DC6CC0016C911 /* Notification.h in Headers */ = {isa = PBXBuildFile; fileRef = 333F704F0FB49CA2008E12A6 /* Notification.h */; settings = {ATTRIBUTES = (Private, ); }; };
    805808                31313F651443B35F006E2A90 /* FilterEffectRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */; };
    806809                31313F661443B35F006E2A90 /* FilterEffectRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */; };
     
    886889                3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3390CA510FFC157B00921962 /* NotificationCenter.cpp */; };
    887890                3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /* NotificationCenter.h */; };
    888                 3390CA580FFC157B00921962 /* NotificationContents.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /* NotificationContents.h */; };
     891                3390CA580FFC157B00921962 /* NotificationContents.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA540FFC157B00921962 /* NotificationContents.h */; settings = {ATTRIBUTES = (Private, ); }; };
    889892                339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
    890893                33C0CCD4112C5E6200CE057D /* SecureTextInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */; };
     
    79257928                31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSKeyframesRule.cpp; sourceTree = "<group>"; };
    79267929                31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframesRule.h; sourceTree = "<group>"; };
     7930                3128CA67147331520074C72A /* NotificationController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NotificationController.cpp; path = notifications/NotificationController.cpp; sourceTree = "<group>"; };
     7931                3128CA6A147331630074C72A /* NotificationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationController.h; path = notifications/NotificationController.h; sourceTree = "<group>"; };
    79277932                31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffectRenderer.cpp; sourceTree = "<group>"; };
    79287933                31313F641443B35E006E2A90 /* FilterEffectRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffectRenderer.h; sourceTree = "<group>"; };
     
    1475614761                                3390CA540FFC157B00921962 /* NotificationContents.h */,
    1475714762                                33503C9910179A74003B47E1 /* NotificationPresenter.h */,
     14763                                3128CA67147331520074C72A /* NotificationController.cpp */,
     14764                                3128CA6A147331630074C72A /* NotificationController.h */,
    1475814765                        );
    1475914766                        name = notifications;
     
    2472324730                                7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
    2472424731                                A10DC76B14747BAB005E2471 /* StyleGridData.h in Headers */,
     24732                                312C0C41146DC6CC0016C911 /* Notification.h in Headers */,
     24733                                3128CA6B147331630074C72A /* NotificationController.h in Headers */,
    2472524734                        );
    2472624735                        runOnlyForDeploymentPostprocessing = 0;
     
    2759627605                                7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
    2759727606                                A10DC76A14747BAB005E2471 /* StyleGridData.cpp in Sources */,
     27607                                3128CA68147331520074C72A /* NotificationController.cpp in Sources */,
    2759827608                        );
    2759927609                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/loader/EmptyClients.h

    r101201 r101307  
    188188    virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) { }
    189189
    190 #if ENABLE(NOTIFICATIONS)
    191     virtual NotificationPresenter* notificationPresenter() const { return 0; }
    192 #endif
    193 
    194190#if ENABLE(DIRECTORY_UPLOAD)
    195191    virtual void enumerateChosenDirectory(FileChooser*) { }
  • trunk/Source/WebCore/notifications/Notification.cpp

    r98388 r101307  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
    3  * Copyright (C) 2009 Apple Inc. All rights reserved.
     3 * Copyright (C) 2009, 2011 Apple Inc. All rights reserved.
    44 *
    55 * Redistribution and use in source and binary forms, with or without
     
    4848namespace WebCore {
    4949
     50Notification::Notification()
     51    : ActiveDOMObject(0, this)
     52{
     53}
     54
    5055Notification::Notification(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider)
    5156    : ActiveDOMObject(context, this)
     
    8186    }
    8287
    83     if (!contents.icon().isEmpty() && !contents.icon().isValid()) {
     88    if (!contents.icon.isEmpty() && !contents.icon.isValid()) {
    8489        ec = SYNTAX_ERR;
    8590        return;
  • trunk/Source/WebCore/notifications/Notification.h

    r99645 r101307  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
    3  * Copyright (C) 2009 Apple Inc. All rights reserved.
     3 * Copyright (C) 2009, 2011 Apple Inc. All rights reserved.
    44 *
    55 * Redistribution and use in source and binary forms, with or without
     
    5050namespace WebCore {
    5151
    52     class NotificationCenter;
    53     class ResourceError;
    54     class ResourceResponse;
    55     class ScriptExecutionContext;
    56     class ThreadableLoader;
     52class NotificationCenter;
     53class ResourceError;
     54class ResourceResponse;
     55class ScriptExecutionContext;
     56class ThreadableLoader;
    5757
    58     typedef int ExceptionCode;
     58typedef int ExceptionCode;
    5959
    60     class Notification : public RefCounted<Notification>, public ActiveDOMObject, public ThreadableLoaderClient, public EventTarget {
    61         WTF_MAKE_FAST_ALLOCATED;
    62     public:
    63         static PassRefPtr<Notification> create(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider);
    64         static PassRefPtr<Notification> create(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider);
    65        
    66         virtual ~Notification();
     60class Notification : public RefCounted<Notification>, public ActiveDOMObject, public ThreadableLoaderClient, public EventTarget {
     61    WTF_MAKE_FAST_ALLOCATED;
     62public:
     63    Notification();
     64    static PassRefPtr<Notification> create(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter> provider);
     65    static PassRefPtr<Notification> create(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter> provider);
     66   
     67    virtual ~Notification();
    6768
    68         void show();
    69         void cancel();
     69    void show();
     70    void cancel();
     71
     72    bool isHTML() const { return m_isHTML; }
     73    void setHTML(bool isHTML) { m_isHTML = isHTML; }
    7074   
    71         bool isHTML() { return m_isHTML; }
    72         KURL url() { return m_notificationURL; }
    73         KURL iconURL() { return m_contents.icon(); }
    74         NotificationContents& contents() { return m_contents; }
     75    KURL url() const { return m_notificationURL; }
     76    void setURL(KURL url) { m_notificationURL = url; }
     77   
     78    KURL iconURL() { return m_contents.icon; }
     79   
     80    const NotificationContents& contents() const { return m_contents; }
     81    NotificationContents& contents() { return m_contents; }
    7582
    76         String dir() const { return m_direction; }
    77         void setDir(const String& dir) { m_direction = dir; }
    78         String replaceId() const { return m_replaceId; }
    79         void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
     83    String dir() const { return m_direction; }
     84    void setDir(const String& dir) { m_direction = dir; }
     85   
     86    String replaceId() const { return m_replaceId; }
     87    void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
    8088
    81         TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
     89    TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
    8290
    83         DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
    84         DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
    85         DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
    86         DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
     91    DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
     92    DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
     93    DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
     94    DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
    8795
    88         using RefCounted<Notification>::ref;
    89         using RefCounted<Notification>::deref;
     96    using RefCounted<Notification>::ref;
     97    using RefCounted<Notification>::deref;
    9098
    91         // EventTarget interface
    92         virtual const AtomicString& interfaceName() const;
    93         virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
     99    // EventTarget interface
     100    virtual const AtomicString& interfaceName() const;
     101    virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
    94102
    95         // ActiveDOMObject interface
    96         virtual void contextDestroyed();
     103    // ActiveDOMObject interface
     104    virtual void contextDestroyed();
    97105
    98         void stopLoading();
     106    void stopLoading();
    99107
    100         SharedBuffer* iconData() { return m_iconData.get(); }
    101         void releaseIconData() { m_iconData = 0; }
     108    SharedBuffer* iconData() { return m_iconData.get(); }
     109    void releaseIconData() { m_iconData = 0; }
    102110
    103         // Deprecated. Use functions from NotificationCenter.
    104         void detachPresenter() { }
     111    // Deprecated. Use functions from NotificationCenter.
     112    void detachPresenter() { }
    105113
    106         virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
    107         virtual void didReceiveData(const char* data, int dataLength);
    108         virtual void didFinishLoading(unsigned long identifier, double finishTime);
    109         virtual void didFail(const ResourceError&);
    110         virtual void didFailRedirectCheck();
     114    virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
     115    virtual void didReceiveData(const char* data, int dataLength);
     116    virtual void didFinishLoading(unsigned long identifier, double finishTime);
     117    virtual void didFail(const ResourceError&);
     118    virtual void didFailRedirectCheck();
    111119
    112     private:
    113         Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
    114         Notification(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
     120private:
     121    Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
     122    Notification(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
    115123
    116         // EventTarget interface
    117         virtual void refEventTarget() { ref(); }
    118         virtual void derefEventTarget() { deref(); }
    119         virtual EventTargetData* eventTargetData();
    120         virtual EventTargetData* ensureEventTargetData();
     124    // EventTarget interface
     125    virtual void refEventTarget() { ref(); }
     126    virtual void derefEventTarget() { deref(); }
     127    virtual EventTargetData* eventTargetData();
     128    virtual EventTargetData* ensureEventTargetData();
    121129
    122         void startLoading();
    123         void finishLoading();
     130    void startLoading();
     131    void finishLoading();
    124132
    125         bool m_isHTML;
    126         KURL m_notificationURL;
    127         NotificationContents m_contents;
     133    bool m_isHTML;
     134    KURL m_notificationURL;
     135    NotificationContents m_contents;
    128136
    129         String m_direction;
    130         String m_replaceId;
     137    String m_direction;
     138    String m_replaceId;
    131139
    132         enum NotificationState {
    133             Idle = 0,
    134             Loading = 1,
    135             Showing = 2,
    136             Cancelled = 3
    137         };
     140    enum NotificationState {
     141        Idle = 0,
     142        Loading = 1,
     143        Showing = 2,
     144        Cancelled = 3
     145    };
    138146
    139         NotificationState m_state;
     147    NotificationState m_state;
    140148
    141         RefPtr<NotificationCenter> m_notificationCenter;
    142        
    143         EventTargetData m_eventTargetData;
     149    RefPtr<NotificationCenter> m_notificationCenter;
     150   
     151    EventTargetData m_eventTargetData;
    144152
    145         RefPtr<ThreadableLoader> m_loader;
    146         RefPtr<SharedBuffer> m_iconData;
    147     };
     153    RefPtr<ThreadableLoader> m_loader;
     154    RefPtr<SharedBuffer> m_iconData;
     155};
    148156
    149157} // namespace WebCore
  • trunk/Source/WebCore/notifications/NotificationCenter.h

    r99645 r101307  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    4445
    4546namespace WebCore {
    46    
    47     class NotificationPresenter;
    48     class VoidCallback;
    4947
    50     class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject {
    51     public:
    52         static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
     48class NotificationPresenter;
     49class VoidCallback;
    5350
    54         PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
    55         {
    56             if (!presenter()) {
    57                 ec = INVALID_STATE_ERR;
    58                 return 0;
    59             }
    60             if (URI.isEmpty()) {
    61                 ec = SYNTAX_ERR;
    62                 return 0;
    63             }
    64             return Notification::create(scriptExecutionContext()->completeURL(URI), scriptExecutionContext(), ec, this);
     51class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject {
     52public:
     53    static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
     54
     55    PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
     56    {
     57        if (!presenter()) {
     58            ec = INVALID_STATE_ERR;
     59            return 0;
    6560        }
     61        if (URI.isEmpty()) {
     62            ec = SYNTAX_ERR;
     63            return 0;
     64        }
     65        return Notification::create(scriptExecutionContext()->completeURL(URI), scriptExecutionContext(), ec, this);
     66    }
    6667
    67         PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
    68         {
    69             if (!presenter()) {
    70                 ec = INVALID_STATE_ERR;
    71                 return 0;
    72             }
    73             NotificationContents contents(iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI), title, body);
    74             return Notification::create(contents, scriptExecutionContext(), ec, this);
     68    PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
     69    {
     70        if (!presenter()) {
     71            ec = INVALID_STATE_ERR;
     72            return 0;
    7573        }
     74        NotificationContents contents(iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI), title, body);
     75        return Notification::create(contents, scriptExecutionContext(), ec, this);
     76    }
    7677
    77         NotificationPresenter* presenter() const { return m_notificationPresenter; }
     78    NotificationPresenter* presenter() const { return m_notificationPresenter; }
    7879
    79         int checkPermission();
    80         void requestPermission(PassRefPtr<VoidCallback> callback);
     80    int checkPermission();
     81    void requestPermission(PassRefPtr<VoidCallback>);
    8182
    82         void disconnectFrame();
     83    void disconnectFrame();
    8384
    84     private:
    85         NotificationCenter(ScriptExecutionContext*, NotificationPresenter*);
     85private:
     86    NotificationCenter(ScriptExecutionContext*, NotificationPresenter*);
    8687
    87         NotificationPresenter* m_notificationPresenter;
    88     };
     88    NotificationPresenter* m_notificationPresenter;
     89};
    8990
    9091} // namespace WebCore
  • trunk/Source/WebCore/notifications/NotificationContents.h

    r95901 r101307  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3435#if ENABLE(NOTIFICATIONS)
    3536
     37#include "KURL.h"
     38#include <wtf/text/WTFString.h>
     39
    3640namespace WebCore {
    3741
    38     class NotificationContents {
    39     public:
    40         NotificationContents() {}
    41         NotificationContents(const KURL& iconUrl, const String& title, const String& body)
    42             : m_icon(iconUrl)
    43             , m_title(title)
    44             , m_body(body) {}
     42struct NotificationContents {
     43public:
     44    NotificationContents() { }
     45    NotificationContents(const KURL& iconUrl, const String& notificationTitle, const String& notificationBody)
     46        : icon(iconUrl)
     47        , title(notificationTitle)
     48        , body(notificationBody)
     49    { }
    4550
    46         KURL icon() const { return m_icon; }
    47         String title() const { return m_title; }
    48         String body() const { return m_body; }
    49 
    50     private:
    51         KURL m_icon;
    52         String m_title;
    53         String m_body;
    54     };
     51    KURL icon;
     52    String title;
     53    String body;
     54};
    5555
    5656} // namespace WebCore
  • trunk/Source/WebCore/notifications/NotificationPresenter.h

    r95901 r101307  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3536#include "VoidCallback.h"
    3637
    37 #if ENABLE(NOTIFICATIONS)
    38 
    3938namespace WebCore {
    4039
    41     class Document;
    42     class Notification;
    43     class KURL;
    44     class ScriptExecutionContext;
     40class Document;
     41class Notification;
     42class KURL;
     43class ScriptExecutionContext;
    4544
    46     class NotificationPresenter {
     45class NotificationPresenter {
    4746
    48     public:
    49         enum Permission {
    50             PermissionAllowed, // User has allowed notifications
    51             PermissionNotAllowed, // User has not yet allowed
    52             PermissionDenied // User has explicitly denied permission
    53         };
     47public:
     48    enum Permission {
     49        PermissionAllowed, // User has allowed notifications
     50        PermissionNotAllowed, // User has not yet allowed
     51        PermissionDenied // User has explicitly denied permission
     52    };
    5453
    55         virtual ~NotificationPresenter() {}
     54    // Requests that a notification be shown.
     55    virtual bool show(Notification*) = 0;
    5656
    57         // Requests that a notification be shown.
    58         virtual bool show(Notification*) = 0;
     57    // Requests that a notification that has already been shown be canceled.
     58    virtual void cancel(Notification*) = 0;
    5959
    60         // Requests that a notification that has already been shown be canceled.
    61         virtual void cancel(Notification*) = 0;
     60    // Informs the presenter that a Notification object has been destroyed
     61    // (such as by a page transition). The presenter may continue showing
     62    // the notification, but must not attempt to call the event handlers.
     63    virtual void notificationObjectDestroyed(Notification*) = 0;
    6264
    63         // Informs the presenter that a Notification object has been destroyed
    64         // (such as by a page transition).  The presenter may continue showing
    65         // the notification, but must not attempt to call the event handlers.
    66         virtual void notificationObjectDestroyed(Notification*) = 0;
     65    // Requests user permission to show desktop notifications from a particular
     66    // script context. The callback parameter should be run when the user has
     67    // made a decision.
     68    virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
    6769
    68         // Requests user permission to show desktop notifications from a particular
    69         // script context. The callback parameter should be run when the user has
    70         // made a decision.
    71         virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
     70    // Cancel all outstanding requests for the ScriptExecutionContext
     71    virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
    7272
    73         // Cancel all outstanding requests for the ScriptExecutionContext
    74         virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
     73    // Checks the current level of permission.
     74    virtual Permission checkPermission(ScriptExecutionContext*) = 0;
    7575
    76         // Checks the current level of permission.
    77         virtual Permission checkPermission(ScriptExecutionContext*) = 0;
    78     };
     76protected:
     77    virtual ~NotificationPresenter() { }
     78};
    7979
    8080} // namespace WebCore
    8181
    82 #endif // ENABLE(NOTIFICATIONS)
    83 
    8482#endif // NotificationPresenter_h
  • trunk/Source/WebCore/page/Chrome.cpp

    r100309 r101307  
    509509#endif
    510510
    511 #if ENABLE(NOTIFICATIONS)
    512 NotificationPresenter* Chrome::notificationPresenter() const
    513 {
    514     return m_client->notificationPresenter();
    515 }
    516 #endif
    517 
    518511// --------
    519512
  • trunk/Source/WebCore/page/Chrome.h

    r100309 r101307  
    5252    class PopupMenu;
    5353    class PopupMenuClient;
    54 #if ENABLE(NOTIFICATIONS)
    55     class NotificationPresenter;
    56 #endif
    5754    class SearchPopupMenu;
    5855
     
    176173#endif
    177174
    178 #if ENABLE(NOTIFICATIONS)
    179         NotificationPresenter* notificationPresenter() const;
    180 #endif
    181 
    182175        bool selectItemWritingDirectionIsNatural();
    183176        bool selectItemAlignmentFollowsMenuWritingDirection();
  • trunk/Source/WebCore/page/ChromeClient.h

    r101290 r101307  
    7676#endif
    7777
    78 #if ENABLE(NOTIFICATIONS)
    79     class NotificationPresenter;
    80 #endif
    81 
    8278    class ChromeClient {
    8379    public:
     
    203199#if ENABLE(DASHBOARD_SUPPORT)
    204200        virtual void dashboardRegionsChanged();
    205 #endif
    206 
    207 #if ENABLE(NOTIFICATIONS)
    208         virtual NotificationPresenter* notificationPresenter() const = 0;
    209201#endif
    210202
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r100182 r101307  
    7575#include "Navigator.h"
    7676#include "NotificationCenter.h"
     77#include "NotificationController.h"
    7778#include "Page.h"
    7879#include "PageGroup.h"
     
    751752        return 0;
    752753
    753     NotificationPresenter* provider = page->chrome()->notificationPresenter();
     754    NotificationPresenter* provider = page->notificationController()->client();
    754755    if (provider)
    755756        m_notifications = NotificationCenter::create(document, provider);   
  • trunk/Source/WebCore/page/Page.cpp

    r100594 r101307  
    5454#include "Navigator.h"
    5555#include "NetworkStateNotifier.h"
     56#include "NotificationController.h"
     57#include "NotificationPresenter.h"
    5658#include "PageGroup.h"
    5759#include "PluginData.h"
     
    137139    , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? adoptPtr(new DeviceMotionController(pageClients.deviceMotionClient)) : nullptr)
    138140    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? adoptPtr(new DeviceOrientationController(this, pageClients.deviceOrientationClient)) : nullptr)
     141#endif
     142#if ENABLE(NOTIFICATIONS)
     143    , m_notificationController(adoptPtr(new NotificationController(this, pageClients.notificationClient)))
    139144#endif
    140145#if ENABLE(INPUT_SPEECH)
     
    10641069    , deviceOrientationClient(0)
    10651070    , speechInputClient(0)
     1071    , notificationClient(0)
    10661072    , userMediaClient(0)
    10671073{
  • trunk/Source/WebCore/page/Page.h

    r100555 r101307  
    7373    class MediaCanStartListener;
    7474    class Node;
     75    class NotificationController;
     76    class NotificationPresenter;
    7577    class PageGroup;
    7678    class PluginData;
     
    118120            RefPtr<BackForwardList> backForwardClient;
    119121            SpeechInputClient* speechInputClient;
     122            NotificationPresenter* notificationClient;
    120123            UserMediaClient* userMediaClient;
    121124        };
     
    183186        DeviceMotionController* deviceMotionController() const { return m_deviceMotionController.get(); }
    184187        DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); }
     188#endif
     189#if ENABLE(NOTIFICATIONS)
     190        NotificationController* notificationController() const { return m_notificationController.get(); }
    185191#endif
    186192#if ENABLE(INPUT_SPEECH)
     
    366372        OwnPtr<DeviceOrientationController> m_deviceOrientationController;
    367373#endif
     374#if ENABLE(NOTIFICATIONS)
     375        OwnPtr<NotificationController> m_notificationController;
     376#endif
    368377#if ENABLE(INPUT_SPEECH)
    369378        SpeechInputClient* m_speechInputClient;
  • trunk/Source/WebKit/ChangeLog

    r101191 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        Reviewed by Sam Weinig.
     8
     9        * WebKit.xcodeproj/project.pbxproj: Add WebNotificationClient class.
     10
    1112011-11-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
    212
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r100954 r101307  
    7575                22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
    7676                29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */; };
     77                31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C11A6C1476552E0049A4CC /* WebNotificationClient.h */; };
     78                31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */; };
    7779                37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B6FB4C1063530C000FDB3B /* WebPDFDocumentExtras.h */; };
    7880                37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37B6FB4D1063530C000FDB3B /* WebPDFDocumentExtras.mm */; };
     
    455457                2D81DAB203EB0B2D00A80166 /* WebFormDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    456458                2D81DAB303EB0B2D00A80166 /* WebFormDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebFormDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
     459                31C11A6C1476552E0049A4CC /* WebNotificationClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
     460                31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNotificationClient.mm; sourceTree = "<group>"; };
    457461                35081D9202B6D4D80ACA2ACA /* WebHTMLRepresentation.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; indentWidth = 4; path = WebHTMLRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
    458462                35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebHTMLRepresentation.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
     
    13121316                                84723BE3056D719E0044BFEA /* WebKeyGenerator.h */,
    13131317                                84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */,
     1318                                31C11A6C1476552E0049A4CC /* WebNotificationClient.h */,
     1319                                31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */,
    13141320                                A58A5797143E727000125F50 /* WebOpenPanelResultListener.h */,
    13151321                                A58A5798143E727000125F50 /* WebOpenPanelResultListener.mm */,
     
    16261632                                A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */,
    16271633                                A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
     1634                                31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */,
    16281635                        );
    16291636                        runOnlyForDeploymentPostprocessing = 0;
     
    20112018                                A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
    20122019                                A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
     2020                                31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
    20132021                        );
    20142022                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebKit/chromium/ChangeLog

    r101306 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        Reviewed by Sam Weinig.
     8
     9        Remove notificationPresenter() from the chrome client, since it is now managed by
     10        the notification controller.
     11
     12        * src/ChromeClientImpl.cpp:
     13        * src/ChromeClientImpl.h:
     14        * src/WebNotification.cpp:
     15        (WebKit::WebNotification::title): Refactoring with NotificationContents conversion to struct.
     16        (WebKit::WebNotification::body): Ditto.
     17        * src/WebViewImpl.cpp:
     18        (WebKit::WebViewImpl::WebViewImpl): Set notification client in web view's page clients.
     19
    1202011-11-28  Beth Dakin  <bdakin@apple.com>
    221
  • trunk/Source/WebKit/chromium/src/ChromeClientImpl.cpp

    r100948 r101307  
    5555#include "NavigationAction.h"
    5656#include "Node.h"
    57 #include "NotificationPresenterImpl.h"
    5857#include "Page.h"
    5958#include "PlatformSupport.h"
     
    786785}
    787786
    788 #if ENABLE(NOTIFICATIONS)
    789 NotificationPresenter* ChromeClientImpl::notificationPresenter() const
    790 {
    791     return m_webView->notificationPresenterImpl();
    792 }
    793 #endif
    794 
    795787bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
    796788{
  • trunk/Source/WebKit/chromium/src/ChromeClientImpl.h

    r100309 r101307  
    131131    virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
    132132    virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
    133 #if ENABLE(NOTIFICATIONS)
    134     virtual WebCore::NotificationPresenter* notificationPresenter() const;
    135 #endif
    136133    virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
    137134    virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
  • trunk/Source/WebKit/chromium/src/WebNotification.cpp

    r99239 r101307  
    8989{
    9090    ASSERT(!isHTML());
    91     return m_private->contents().title();
     91    return m_private->contents().title;
    9292}
    9393
     
    9595{
    9696    ASSERT(!isHTML());
    97     return m_private->contents().body();
     97    return m_private->contents().body;
    9898}
    9999
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r101058 r101307  
    395395    pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
    396396    pageClients.geolocationClient = m_geolocationClientProxy.get();
     397#if ENABLE(NOTIFICATIONS)
     398    pageClients.notificationClient = &m_notificationPresenter;
     399#endif
    397400    pageClients.backForwardClient = BackForwardListChromium::create(this);
    398401#if ENABLE(MEDIA_STREAM)
  • trunk/Source/WebKit/mac/ChangeLog

    r101256 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        Reviewed by Sam Weinig.
     8
     9        * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
     10
     11        * WebCoreSupport/WebNotificationClient.h: Added.
     12        (WebNotificationClient::webView):
     13        * WebCoreSupport/WebNotificationClient.mm: Added. Implemented as stubs for now.
     14        (WebNotificationClient::WebNotificationClient):
     15        (WebNotificationClient::show):
     16        (WebNotificationClient::cancel):
     17        (WebNotificationClient::notificationObjectDestroyed):
     18        (WebNotificationClient::requestPermission):
     19        (WebNotificationClient::cancelRequestsForPermission):
     20        (WebNotificationClient::checkPermission):
     21        * WebView/WebView.mm: Set PageClient's notification client to an instance of this stubbed class.
     22
    1232011-11-28  Adam Roben  <aroben@apple.com>
    224
  • trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig

    r100226 r101307  
    9595ENABLE_MHTML = ;
    9696ENABLE_MUTATION_OBSERVERS = ;
    97 ENABLE_NOTIFICATIONS = ;
     97
     98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
     99ENABLE_NOTIFICATIONS_macosx = ;
     100
    98101ENABLE_PAGE_VISIBILITY_API = ;
    99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
  • trunk/Source/WebKit/mac/WebView/WebView.mm

    r101256 r101307  
    8888#import "WebNSViewExtras.h"
    8989#import "WebNodeHighlight.h"
     90#import "WebNotificationClient.h"
    9091#import "WebPDFView.h"
    9192#import "WebPanelAuthenticationHandler.h"
     
    740741    pageClients.geolocationClient = new WebGeolocationClient(self);
    741742#endif
     743#if ENABLE(NOTIFICATIONS)
     744    pageClients.notificationClient = new WebNotificationClient(self);
     745#endif
    742746#if ENABLE(DEVICE_ORIENTATION)
    743747    pageClients.deviceOrientationClient = new WebDeviceOrientationClient(self);
  • trunk/Source/WebKit/qt/Api/qwebpage.cpp

    r100658 r101307  
    347347        pageClients.geolocationClient = new GeolocationClientQt(q);
    348348#endif
     349#if ENABLE(NOTIFICATIONS)
     350    pageClients.notificationClient = NotificationPresenterClientQt::notificationPresenter();
     351#endif
    349352    page = new Page(pageClients);
    350353
  • trunk/Source/WebKit/qt/ChangeLog

    r101262 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        Reviewed by Sam Weinig.
     8
     9        * Api/qwebpage.cpp: Add notification client to pageClients.
     10        (QWebPagePrivate::QWebPagePrivate):
     11        * WebCoreSupport/ChromeClientQt.cpp: Remove notification client from ChromeClient implementation.
     12        * WebCoreSupport/ChromeClientQt.h:
     13        * WebCoreSupport/NotificationPresenterClientQt.cpp: Refactor with change of NotificationContents to struct
     14        (WebCore::NotificationWrapper::title):
     15        (WebCore::NotificationWrapper::message):
     16        (WebCore::NotificationPresenterClientQt::displayNotification):
     17        (WebCore::NotificationPresenterClientQt::cancel):
     18        (WebCore::NotificationPresenterClientQt::notificationClicked):
     19        (WebCore::NotificationPresenterClientQt::dumpReplacedIdText):
     20        (WebCore::NotificationPresenterClientQt::dumpShowText):
     21
    1222011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
    223
  • trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp

    r100309 r101307  
    5050#include "NetworkingContext.h"
    5151#include "NotImplemented.h"
    52 #include "NotificationPresenterClientQt.h"
    5352#include "Page.h"
    5453#include "PageClientQt.h"
     
    557556    emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota, static_cast<quint64>(totalSpaceNeeded));
    558557}
    559 
    560 #if ENABLE(NOTIFICATIONS)
    561 NotificationPresenter* ChromeClientQt::notificationPresenter() const
    562 {
    563     return NotificationPresenterClientQt::notificationPresenter();
    564 }
    565 #endif
    566558
    567559void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
  • trunk/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h

    r100309 r101307  
    143143#endif
    144144
    145 #if ENABLE(NOTIFICATIONS)
    146     virtual NotificationPresenter* notificationPresenter() const;
    147 #endif
    148 
    149145#if USE(ACCELERATED_COMPOSITING)
    150146    // This is a hook for WebCore to tell us what we need to do with the GraphicsLayers.
  • trunk/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp

    r95901 r101307  
    9292    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
    9393    if (notification)
    94         return notification->contents().title();
     94        return notification->contents().title;
    9595#endif
    9696    return QString();
     
    102102    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
    103103    if (notification)
    104         return notification->contents().body();
     104        return notification->contents().body;
    105105#endif
    106106    return QString();
     
    198198        message = notification->url().string();
    199199    else {
    200         title = notification->contents().title();
    201         message = notification->contents().body();
     200        title = notification->contents().title;
     201        message = notification->contents().body;
    202202    }
    203203
     
    234234    wrapper->connect(wrapper->m_notificationIcon.get(), SIGNAL(messageClicked()), wrapper, SLOT(notificationClicked()));
    235235    wrapper->m_notificationIcon->show();
    236     wrapper->m_notificationIcon->showMessage(notification->contents().title(), notification->contents().body());
     236    wrapper->m_notificationIcon->showMessage(notification->contents().title, notification->contents().body);
    237237#endif
    238238}
     
    244244            printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
    245245        else
    246             printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title()).toUtf8().constData());
     246            printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->contents().title).toUtf8().constData());
    247247    }
    248248
     
    284284            notificationTitle = notification->url().string();
    285285        else
    286             notificationTitle = notification->contents().title();
     286            notificationTitle = notification->contents().title;
    287287        if (notificationTitle == title)
    288288            break;
     
    420420{
    421421    if (notification)
    422         printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title()).toUtf8().constData());
     422        printf("REPLACING NOTIFICATION %s\n", notification->isHTML() ? QString(notification->url().string()).toUtf8().constData() : QString(notification->contents().title).toUtf8().constData());
    423423}
    424424
     
    430430        printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
    431431                notification->dir() == "rtl" ? "(RTL)" : "",
    432             QString(notification->contents().icon().string()).toUtf8().constData(), QString(notification->contents().title()).toUtf8().constData(),
    433             QString(notification->contents().body()).toUtf8().constData());
     432            QString(notification->contents().icon.string()).toUtf8().constData(), QString(notification->contents().title).toUtf8().constData(),
     433            QString(notification->contents().body).toUtf8().constData());
    434434    }
    435435}
  • trunk/Source/WebKit2/ChangeLog

    r101293 r101307  
     12011-11-28  Jon Lee  <jonlee@apple.com>
     2
     3        Create skeleton framework for notifications support in WK2
     4        https://bugs.webkit.org/show_bug.cgi?id=73253
     5        <rdar://problem/10356943>
     6
     7        Reviewed by Sam Weinig.
     8
     9        * WebKit2.xcodeproj/project.pbxproj: Added classes for notification support.
     10        * win/WebKit2.vcproj: Ditto.
     11        * Target.pri: Ditto.
     12        * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
     13        * DerivedSources.make: Add Notifications to VPATH.
     14        * Platform/CoreIPC/MessageID.h: List WebNotificationManagerProxy as a class with messages.
     15        * Scripts/webkit2/messages.py: Mark WebCore::NotificationContents as a struct.
     16
     17        * Shared/API/c/WKBase.h: Map opaque types to NotificationProvider, NotificationManager, and Notification.
     18        * UIProcess/API/C/WKAPICast.h: Map WK types toNotificationProvider, NotificationManager, and Notification.
     19        * Shared/APIObject.h: Add Notification and NotificationManager as APIObjects.
     20        * Shared/WebCoreArgumentCoders.cpp: Added coders for KURL.
     21        (CoreIPC::::encode):
     22        (CoreIPC::::decode):
     23        * Shared/WebCoreArgumentCoders.h:
     24
     25        * UIProcess/WebNotification.cpp: Added.
     26        (WebKit::WebNotification::WebNotification):
     27        (WebKit::WebNotification::~WebNotification):
     28        (WebKit::WebNotification::encode):
     29        (WebKit::WebNotification::decode):
     30        * UIProcess/WebNotification.h: Added.
     31        (WebKit::WebNotification::create):
     32        (WebKit::WebNotification::title):
     33        (WebKit::WebNotification::body):
     34        (WebKit::WebNotification::type):
     35        * UIProcess/API/C/WKNotification.cpp: Added as API.
     36        (WKNotificationGetTypeID):
     37        (WKNotificationCopyTitle):
     38        (WKNotificationCopyBody):
     39        * UIProcess/API/C/WKNotification.h: Added as API.
     40
     41        * WebProcess/Notifications/WebNotificationManager.h: Added. Contains for now show() and cancel().
     42        The rest of the notification client methods will be added later. These two functions send messages
     43        to the manager proxy.
     44        * WebProcess/Notifications/WebNotificationManager.cpp: Added.
     45        (WebKit::WebNotificationManager::WebNotificationManager):
     46        (WebKit::WebNotificationManager::~WebNotificationManager):
     47        (WebKit::WebNotificationManager::show):
     48        (WebKit::WebNotificationManager::cancel):
     49
     50        * UIProcess/WebNotificationManagerProxy.cpp: Added.
     51        (WebKit::WebNotificationManagerProxy::create):
     52        (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
     53        (WebKit::WebNotificationManagerProxy::~WebNotificationManagerProxy):
     54        (WebKit::WebNotificationManagerProxy::invalidate):
     55        (WebKit::WebNotificationManagerProxy::initializeProvider):
     56        (WebKit::WebNotificationManagerProxy::didReceiveMessage):
     57        (WebKit::WebNotificationManagerProxy::show):
     58        (WebKit::WebNotificationManagerProxy::cancel):
     59        * UIProcess/WebNotificationManagerProxy.h: Added.
     60        (WebKit::WebNotificationManagerProxy::clearContext):
     61        (WebKit::WebNotificationManagerProxy::type):
     62        * UIProcess/WebNotificationManagerProxy.messages.in: Added.
     63        * UIProcess/API/C/WKNotificationManager.cpp: Added.
     64        (WKNotificationManagerGetTypeID):
     65        (WKNotificationManagerSetProvider):
     66        * UIProcess/API/C/WKNotificationManager.h: Added.
     67
     68        * UIProcess/WebContext.h: Add the notification manager to the web context.
     69        (WebKit::WebContext::notificationManagerProxy): Access the manager.
     70        * UIProcess/WebContext.cpp:
     71        (WebKit::WebContext::WebContext): Boilerplate for managers.
     72        (WebKit::WebContext::~WebContext): Boilerplate for managers.
     73        (WebKit::WebContext::disconnectProcess): Boilerplate for managers.
     74        (WebKit::WebContext::didReceiveMessage): Forward messages to the notification manager.
     75        * UIProcess/API/C/WKContext.cpp: Expose as API.
     76        (WKContextGetNotificationManager):
     77        * UIProcess/API/C/WKContext.h: Expose as API.
     78
     79        * UIProcess/API/C/WKNotificationProvider.h: Added.
     80        * UIProcess/WebNotificationProvider.h: Added as APIClient.
     81        * UIProcess/WebNotificationProvider.cpp: Added.
     82        (WebKit::WebNotificationProvider::show): Forward call to the client.
     83        (WebKit::WebNotificationProvider::cancel): Forward call to the client.
     84        * UIProcess/WebProcessProxy.cpp:
     85        (WebKit::WebProcessProxy::didReceiveMessage): Forward messages for notification manager to the context.
     86
     87        * WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove notificationPresenter().
     88        * WebProcess/WebCoreSupport/WebChromeClient.h: Remove notificationPresenter().
     89
     90        * WebProcess/WebCoreSupport/WebNotificationClient.h: Added. Forwards client methods to manager.
     91        * WebProcess/WebCoreSupport/WebNotificationClient.cpp: Added. Mostly stub implementation for now.
     92        (WebKit::WebNotificationClient::WebNotificationClient):
     93        (WebKit::WebNotificationClient::~WebNotificationClient):
     94        (WebKit::WebNotificationClient::show):
     95        (WebKit::WebNotificationClient::cancel):
     96        (WebKit::WebNotificationClient::notificationObjectDestroyed):
     97        (WebKit::WebNotificationClient::requestPermission):
     98        (WebKit::WebNotificationClient::cancelRequestsForPermission):
     99        (WebKit::WebNotificationClient::checkPermission):
     100
     101        * WebProcess/WebPage/WebPage.h: Added WebNotificationClient as one of its page clients.
     102        * WebProcess/WebPage/WebPage.cpp:
     103        (WebKit::WebPage::WebPage): Set the notification client to WebNotificationClient.
     104        * WebProcess/WebProcess.h: Added WebNotificationManager.
     105        (WebKit::WebProcess::notificationManager):
     106        * WebProcess/WebProcess.cpp:
     107        (WebKit::WebProcess::WebProcess): Initialize notificaton manager.
     108
    11092011-11-28  Brent Fulgham  <bfulgham@webkit.org>
    2110
  • trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig

    r100226 r101307  
    9595ENABLE_MHTML = ;
    9696ENABLE_MUTATION_OBSERVERS = ;
    97 ENABLE_NOTIFICATIONS = ;
     97
     98ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
     99ENABLE_NOTIFICATIONS_macosx = ;
     100
    98101ENABLE_PAGE_VISIBILITY_API = ;
    99102ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
  • trunk/Source/WebKit2/DerivedSources.make

    r96904 r101307  
    3333    $(WebKit2)/WebProcess/KeyValueStorage \
    3434    $(WebKit2)/WebProcess/MediaCache \
     35    $(WebKit2)/WebProcess/Notifications \
    3536    $(WebKit2)/WebProcess/Plugins \
    3637    $(WebKit2)/WebProcess/ResourceCache \
     
    7374    WebMediaCacheManager \
    7475    WebMediaCacheManagerProxy \
     76    WebNotificationManagerProxy \
    7577    WebPage \
    7678    WebPageProxy \
  • trunk/Source/WebKit2/DerivedSources.pri

    r101133 r101307  
    4242    WebProcess/KeyValueStorage \
    4343    WebProcess/MediaCache \
     44    WebProcess/Notifications \
    4445    WebProcess/Plugins \
    4546    WebProcess/ResourceCache \
     
    7879    WebMediaCacheManager.messages.in \
    7980    WebMediaCacheManagerProxy.messages.in \
     81    WebNotificationManagerProxy.messages.in \
    8082    WebFullScreenManager.messages.in \
    8183    WebFullScreenManagerProxy.messages.in \
  • trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h

    r97639 r101307  
    6868    MessageClassWebKeyValueStorageManagerProxy,
    6969    MessageClassWebMediaCacheManagerProxy,
     70    MessageClassWebNotificationManagerProxy,
    7071    MessageClassWebPageProxy,
    7172    MessageClassWebProcessProxy,
  • trunk/Source/WebKit2/Scripts/webkit2/messages.py

    r100789 r101307  
    180180        'WebCore::MatrixTransformOperation',
    181181        'WebCore::Matrix3DTransformOperation',
     182        'WebCore::NotificationContents',
    182183        'WebCore::PerspectiveTransformOperation',
    183184        'WebCore::PluginInfo',
  • trunk/Source/WebKit2/Shared/API/c/WKBase.h

    r100336 r101307  
    9696typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
    9797typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
     98typedef const struct OpaqueWKNotification* WKNotificationRef;
     99typedef const struct OpaqueWKNotificationManager* WKNotificationManagerRef;
     100typedef const struct OpaqueWKNotificationProvider* WKNotificationProviderRef;
    98101typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
    99102typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
  • trunk/Source/WebKit2/Shared/APIObject.h

    r100336 r101307  
    9090        TypeMediaCacheManager,
    9191        TypeNavigationData,
     92        TypeNotification,
     93        TypeNotificationManager,
    9294        TypeOpenPanelParameters,
    9395        TypeOpenPanelResultListener,
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r100922 r101307  
    3838#include <WebCore/GraphicsLayer.h>
    3939#include <WebCore/Image.h>
     40#include <WebCore/KURL.h>
    4041#include <WebCore/PluginData.h>
    4142#include <WebCore/ProtectionSpace.h>
     
    622623    if (!decoder->decode(result.numberOfItemsToBeAccepted))
    623624        return false;
     625    return true;
     626}
     627
     628void ArgumentCoder<KURL>::encode(ArgumentEncoder* encoder, const KURL& result)
     629{
     630    encoder->encode(result.string());
     631}
     632   
     633bool ArgumentCoder<KURL>::decode(ArgumentDecoder* decoder, KURL& result)
     634{
     635    String urlAsString;
     636    if (!decoder->decode(urlAsString))
     637        return false;
     638    result = KURL(WebCore::ParsedURLString, urlAsString);
    624639    return true;
    625640}
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.h

    r100922 r101307  
    4444    class IntSize;
    4545    class KeyframeValueList;
     46    class KURL;
     47    class Notification;
    4648    class ProtectionSpace;
    4749    class ResourceError;
     
    222224};
    223225
     226template<> struct ArgumentCoder<WebCore::KURL> {
     227    static void encode(ArgumentEncoder*, const WebCore::KURL&);
     228    static bool decode(ArgumentDecoder*, WebCore::KURL&);
     229};
     230
    224231#if PLATFORM(QT)
    225232template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
  • trunk/Source/WebKit2/Target.pri

    r101247 r101307  
    5151    $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerMessages.h \
    5252    $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerProxyMessages.h \
     53    $$WEBKIT2_GENERATED_SOURCES_DIR/WebNotificationManagerProxyMessages.h \
    5354    $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageMessages.h \
    5455    $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageProxyMessages.h \
     
    9192    $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerMessageReceiver.cpp \
    9293    $$WEBKIT2_GENERATED_SOURCES_DIR/WebMediaCacheManagerProxyMessageReceiver.cpp \
     94    $$WEBKIT2_GENERATED_SOURCES_DIR/WebNotificationManagerProxyMessageReceiver.cpp \
    9395    $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageMessageReceiver.cpp \
    9496    $$WEBKIT2_GENERATED_SOURCES_DIR/WebPageProxyMessageReceiver.cpp \
     
    233235    UIProcess/API/C/WKOpenPanelResultListener.h \
    234236    UIProcess/API/C/WKNavigationData.h \
     237    UIProcess/API/C/WKNotification.h \
     238    UIProcess/API/C/WKNotificationManager.h \
     239    UIProcess/API/C/WKNotificationProvider.h \
    235240    UIProcess/API/C/WKPage.h \
    236241    UIProcess/API/C/WKPageGroup.h \
     
    305310    UIProcess/WebMediaCacheManagerProxy.h \
    306311    UIProcess/WebNavigationData.h \
     312    UIProcess/WebNotification.h \
     313    UIProcess/WebNotificationManagerProxy.h \
     314    UIProcess/WebNotificationProvider.h \
    307315    UIProcess/WebOpenPanelResultListenerProxy.h \
    308316    UIProcess/WebPageContextMenuClient.h \
     
    373381    WebProcess/KeyValueStorage/WebKeyValueStorageManager.h \
    374382    WebProcess/MediaCache/WebMediaCacheManager.h \
     383    WebProcess/Notifications/WebNotificationManager.h \
    375384    WebProcess/ResourceCache/WebResourceCacheManager.h \
    376385    WebProcess/Plugins/Netscape/JSNPMethod.h \
     
    399408    WebProcess/WebCoreSupport/WebInspectorClient.h \
    400409    WebProcess/WebCoreSupport/WebInspectorFrontendClient.h \
     410    WebProcess/WebCoreSupport/WebNotificationClient.h \
    401411    WebProcess/WebCoreSupport/WebPlatformStrategies.h \
    402412    WebProcess/WebCoreSupport/WebPopupMenu.h \
     
    540550    UIProcess/API/C/WKIconDatabase.cpp \
    541551    UIProcess/API/C/WKInspector.cpp \
     552    UIProcess/API/C/WKNotification.cpp \
     553    UIProcess/API/C/WKNotificationManager.cpp \
    542554    UIProcess/API/C/WKOpenPanelParameters.cpp \
    543555    UIProcess/API/C/WKOpenPanelResultListener.cpp \
     
    609621    UIProcess/WebMediaCacheManagerProxy.cpp \
    610622    UIProcess/WebNavigationData.cpp \
     623    UIProcess/WebNotification.cpp \
     624    UIProcess/WebNotificationManagerProxy.cpp \
     625    UIProcess/WebNotificationProvider.cpp \
    611626    UIProcess/WebOpenPanelResultListenerProxy.cpp \
    612627    UIProcess/WebPageContextMenuClient.cpp \
     
    693708    WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp \
    694709    WebProcess/MediaCache/WebMediaCacheManager.cpp \
     710    WebProcess/Notifications/WebNotificationManager.cpp \
    695711    WebProcess/ResourceCache/WebResourceCacheManager.cpp \
    696712    WebProcess/Plugins/Netscape/JSNPMethod.cpp \
     
    720736    WebProcess/WebCoreSupport/WebInspectorClient.cpp \
    721737    WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp \
     738    WebProcess/WebCoreSupport/WebNotificationClient.cpp \
    722739    WebProcess/WebCoreSupport/WebPlatformStrategies.cpp \
    723740    WebProcess/WebCoreSupport/WebPopupMenu.cpp \
  • trunk/Source/WebKit2/UIProcess/API/C/WKAPICast.h

    r96858 r101307  
    7373class WebMediaCacheManagerProxy;
    7474class WebNavigationData;
     75class WebNotification;
     76class WebNotificationProvider;
     77class WebNotificationManagerProxy;
    7578class WebOpenPanelParameters;
    7679class WebOpenPanelResultListenerProxy;
     
    105108WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
    106109WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
     110WK_ADD_API_MAPPING(WKNotificationManagerRef, WebNotificationManagerProxy)
     111WK_ADD_API_MAPPING(WKNotificationProviderRef, WebNotificationProvider)
     112WK_ADD_API_MAPPING(WKNotificationRef, WebNotification)
    107113WK_ADD_API_MAPPING(WKOpenPanelParametersRef, WebOpenPanelParameters)
    108114WK_ADD_API_MAPPING(WKOpenPanelResultListenerRef, WebOpenPanelResultListenerProxy)
  • trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp

    r100378 r101307  
    196196}
    197197
     198WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef contextRef)
     199{
     200    return toAPI(toImpl(contextRef)->notificationManagerProxy());
     201}
     202
    198203WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef contextRef)
    199204{
  • trunk/Source/WebKit2/UIProcess/API/C/WKContext.h

    r100378 r101307  
    149149WK_EXPORT WKKeyValueStorageManagerRef WKContextGetKeyValueStorageManager(WKContextRef context);
    150150WK_EXPORT WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef context);
     151WK_EXPORT WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef context);
    151152WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
    152153WK_EXPORT WKResourceCacheManagerRef WKContextGetResourceCacheManager(WKContextRef context);
  • trunk/Source/WebKit2/UIProcess/WebContext.cpp

    r101004 r101307  
    4747#include "WebKeyValueStorageManagerProxy.h"
    4848#include "WebMediaCacheManagerProxy.h"
     49#include "WebNotificationManagerProxy.h"
    4950#include "WebPluginSiteDataManager.h"
    5051#include "WebPageGroup.h"
     
    132133    , m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
    133134    , m_mediaCacheManagerProxy(WebMediaCacheManagerProxy::create(this))
     135    , m_notificationManagerProxy(WebNotificationManagerProxy::create(this))
    134136    , m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
    135137    , m_resourceCacheManagerProxy(WebResourceCacheManagerProxy::create(this))
     
    182184    m_mediaCacheManagerProxy->invalidate();
    183185    m_mediaCacheManagerProxy->clearContext();
     186   
     187    m_notificationManagerProxy->invalidate();
     188    m_notificationManagerProxy->clearContext();
    184189
    185190    m_pluginSiteDataManager->invalidate();
     
    370375    m_keyValueStorageManagerProxy->invalidate();
    371376    m_mediaCacheManagerProxy->invalidate();
     377    m_notificationManagerProxy->invalidate();
    372378    m_resourceCacheManagerProxy->invalidate();
    373379
     
    694700    if (messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()) {
    695701        m_mediaCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
     702        return;
     703    }
     704   
     705    if (messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()) {
     706        m_notificationManagerProxy->didReceiveMessage(connection, messageID, arguments);
    696707        return;
    697708    }
  • trunk/Source/WebKit2/UIProcess/WebContext.h

    r100378 r101307  
    5555class WebKeyValueStorageManagerProxy;
    5656class WebMediaCacheManagerProxy;
     57class WebNotificationManagerProxy;
    5758class WebPageGroup;
    5859class WebPageProxy;
     
    158159    WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
    159160    WebMediaCacheManagerProxy* mediaCacheManagerProxy() const { return m_mediaCacheManagerProxy.get(); }
     161    WebNotificationManagerProxy* notificationManagerProxy() const { return m_notificationManagerProxy.get(); }
    160162    WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
    161163    WebResourceCacheManagerProxy* resourceCacheManagerProxy() const { return m_resourceCacheManagerProxy.get(); }
     
    283285    RefPtr<WebKeyValueStorageManagerProxy> m_keyValueStorageManagerProxy;
    284286    RefPtr<WebMediaCacheManagerProxy> m_mediaCacheManagerProxy;
     287    RefPtr<WebNotificationManagerProxy> m_notificationManagerProxy;
    285288    RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
    286289    RefPtr<WebResourceCacheManagerProxy> m_resourceCacheManagerProxy;
  • trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp

    r101141 r101307  
    303303        || messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()
    304304        || messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()
     305        || messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()
    305306        || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
    306307        m_context->didReceiveMessage(connection, messageID, arguments);
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r100534 r101307  
    247247                29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */; };
    248248                29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */; };
     249                3109996F146C741D0029DEB9 /* WebNotificationManagerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */; };
     250                31099970146C74200029DEB9 /* WebNotificationManagerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */; };
     251                31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099971146C759B0029DEB9 /* WebNotificationClient.cpp */; };
     252                3109997A146C8B140029DEB9 /* WebNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31099978146C8B140029DEB9 /* WebNotificationManager.cpp */; };
     253                3109997B146C8B140029DEB9 /* WebNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099979146C8B140029DEB9 /* WebNotificationManager.h */; };
     254                310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31099968146C71F50029DEB9 /* WebNotificationClient.h */; };
     255                312C0C47146DDBBD0016C911 /* WebNotificationProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */; };
     256                312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */; settings = {ATTRIBUTES = (Private, ); }; };
     257                318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */; };
     258                318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */; };
     259                318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
     260                318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */; };
     261                318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17614743E6000A8FBB2 /* WKNotification.cpp */; };
     262                318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17814743E6A00A8FBB2 /* WKNotification.h */; settings = {ATTRIBUTES = (Private, ); }; };
     263                31C11AB3148452E90049A4CC /* WebNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C11AB1148452E90049A4CC /* WebNotification.cpp */; };
     264                31C11AB4148452E90049A4CC /* WebNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C11AB2148452E90049A4CC /* WebNotification.h */; };
    249265                31EA25D2134F78C0005B1452 /* NativeWebMouseEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */; };
    250266                330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */; };
     
    12011217                29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObject.h; sourceTree = "<group>"; };
    12021218                29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObject.mm; sourceTree = "<group>"; };
     1219                31099968146C71F50029DEB9 /* WebNotificationClient.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationClient.h; sourceTree = "<group>"; };
     1220                3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxy.h; sourceTree = "<group>"; };
     1221                3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxy.cpp; sourceTree = "<group>"; };
     1222                3109996D146C73C40029DEB9 /* WebNotificationManagerProxy.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManagerProxy.messages.in; sourceTree = "<group>"; };
     1223                31099971146C759B0029DEB9 /* WebNotificationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationClient.cpp; sourceTree = "<group>"; };
     1224                31099978146C8B140029DEB9 /* WebNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebNotificationManager.cpp; path = Notifications/WebNotificationManager.cpp; sourceTree = "<group>"; };
     1225                31099979146C8B140029DEB9 /* WebNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebNotificationManager.h; path = Notifications/WebNotificationManager.h; sourceTree = "<group>"; };
     1226                312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationProvider.cpp; sourceTree = "<group>"; };
     1227                312C0C48146DDBD30016C911 /* WebNotificationProvider.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebNotificationProvider.h; sourceTree = "<group>"; };
     1228                312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationProvider.h; sourceTree = "<group>"; };
     1229                318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
     1230                318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxyMessages.h; sourceTree = "<group>"; };
     1231                318BE17014743DB100A8FBB2 /* WKNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationManager.h; sourceTree = "<group>"; };
     1232                318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotificationManager.cpp; sourceTree = "<group>"; };
     1233                318BE17614743E6000A8FBB2 /* WKNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotification.cpp; sourceTree = "<group>"; };
     1234                318BE17814743E6A00A8FBB2 /* WKNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKNotification.h; sourceTree = "<group>"; };
     1235                31C11AB1148452E90049A4CC /* WebNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotification.cpp; sourceTree = "<group>"; };
     1236                31C11AB2148452E90049A4CC /* WebNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotification.h; sourceTree = "<group>"; };
    12031237                31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeWebMouseEventMac.mm; sourceTree = "<group>"; };
    12041238                31EA25D3134F78D6005B1452 /* NativeWebMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebMouseEvent.h; sourceTree = "<group>"; };
     
    24272461                        sourceTree = "<group>";
    24282462                };
     2463                31099974146C8AA80029DEB9 /* Notifications (User) */ = {
     2464                        isa = PBXGroup;
     2465                        children = (
     2466                                31099978146C8B140029DEB9 /* WebNotificationManager.cpp */,
     2467                                31099979146C8B140029DEB9 /* WebNotificationManager.h */,
     2468                        );
     2469                        name = "Notifications (User)";
     2470                        sourceTree = "<group>";
     2471                };
    24292472                32C88DFF0371C24200C91783 /* Other Sources */ = {
    24302473                        isa = PBXGroup;
     
    25942637                                1A6FA01C11E1526300DB1371 /* mac */,
    25952638                                33D3A3BD1339609800709BE4 /* MediaCache */,
     2639                                31099974146C8AA80029DEB9 /* Notifications (User) */,
    25962640                                1A6FB7AA11E64B4900DB1371 /* Plugins */,
    25972641                                3336762B130C9978006C9DE2 /* ResourceCache */,
     
    26332677                                1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */,
    26342678                                1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */,
     2679                                31099971146C759B0029DEB9 /* WebNotificationClient.cpp */,
     2680                                31099968146C71F50029DEB9 /* WebNotificationClient.h */,
    26352681                                1A3E736011CC2659007BD539 /* WebPlatformStrategies.cpp */,
    26362682                                1A3E735F11CC2659007BD539 /* WebPlatformStrategies.h */,
     
    27832829                                BCF69FA11176D01400471A52 /* WebNavigationData.cpp */,
    27842830                                BCF69FA01176D01400471A52 /* WebNavigationData.h */,
     2831                                31C11AB1148452E90049A4CC /* WebNotification.cpp */,
     2832                                31C11AB2148452E90049A4CC /* WebNotification.h */,
     2833                                3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */,
     2834                                3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */,
     2835                                3109996D146C73C40029DEB9 /* WebNotificationManagerProxy.messages.in */,
     2836                                312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */,
     2837                                312C0C48146DDBD30016C911 /* WebNotificationProvider.h */,
    27852838                                BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
    27862839                                BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
     
    28772930                                BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */,
    28782931                                BCF69FA71176D1CB00471A52 /* WKNavigationData.h */,
     2932                                318BE17614743E6000A8FBB2 /* WKNotification.cpp */,
     2933                                318BE17814743E6A00A8FBB2 /* WKNotification.h */,
     2934                                318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */,
     2935                                318BE17014743DB100A8FBB2 /* WKNotificationManager.h */,
     2936                                312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */,
    28792937                                BC857FE512B843D800EDEB2E /* WKOpenPanelParameters.cpp */,
    28802938                                BC857FE412B843D800EDEB2E /* WKOpenPanelParameters.h */,
     
    34463504                                33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */,
    34473505                                33D3A3C71339617900709BE4 /* WebMediaCacheManagerProxyMessages.h */,
     3506                                318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */,
     3507                                318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */,
    34483508                                C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
    34493509                                C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
     
    39674027                                BC4A6297147313A0006C681A /* WKConnectionRef.h in Headers */,
    39684028                                3788A05C14743C90006319E5 /* WKBrowsingContextControllerPrivate.h in Headers */,
     4029                                3109996F146C741D0029DEB9 /* WebNotificationManagerProxy.h in Headers */,
     4030                                3109997B146C8B140029DEB9 /* WebNotificationManager.h in Headers */,
     4031                                310999C7146C9E3D0029DEB9 /* WebNotificationClient.h in Headers */,
     4032                                312C0C4A146DDC8A0016C911 /* WKNotificationProvider.h in Headers */,
     4033                                318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */,
     4034                                318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */,
     4035                                318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */,
     4036                                31C11AB4148452E90049A4CC /* WebNotification.h in Headers */,
    39694037                        );
    39704038                        runOnlyForDeploymentPostprocessing = 0;
     
    46674735                                BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */,
    46684736                                BC4A6296147313A0006C681A /* WKConnectionRef.cpp in Sources */,
     4737                                31099970146C74200029DEB9 /* WebNotificationManagerProxy.cpp in Sources */,
     4738                                31099973146C75A20029DEB9 /* WebNotificationClient.cpp in Sources */,
     4739                                3109997A146C8B140029DEB9 /* WebNotificationManager.cpp in Sources */,
     4740                                312C0C47146DDBBD0016C911 /* WebNotificationProvider.cpp in Sources */,
     4741                                318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */,
     4742                                318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */,
     4743                                318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */,
     4744                                31C11AB3148452E90049A4CC /* WebNotification.cpp in Sources */,
    46694745                        );
    46704746                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp

    r101290 r101307  
    694694#endif
    695695
    696 #if ENABLE(NOTIFICATIONS)
    697 WebCore::NotificationPresenter* WebChromeClient::notificationPresenter() const
    698 {
    699     return 0;
    700 }
    701 #endif
    702 
    703696#if ENABLE(TOUCH_EVENTS)
    704697void WebChromeClient::needTouchEvents(bool needTouchEvents)
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h

    r101290 r101307  
    184184#endif
    185185
    186 #if ENABLE(NOTIFICATIONS)
    187     virtual WebCore::NotificationPresenter* notificationPresenter() const OVERRIDE;
    188 #endif
    189 
    190186#if ENABLE(TOUCH_EVENTS)
    191187    virtual void needTouchEvents(bool) OVERRIDE;
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp

    r101259 r101307  
    6262#include "WebInspector.h"
    6363#include "WebInspectorClient.h"
     64#include "WebNotificationClient.h"
    6465#include "WebOpenPanelResultListener.h"
    6566#include "WebPageCreationParameters.h"
     
    217218    pageClients.inspectorClient = new WebInspectorClient(this);
    218219#endif
     220#if ENABLE(NOTIFICATIONS)
     221    pageClients.notificationClient = new WebNotificationClient(this);
     222#endif
     223   
    219224    m_page = adoptPtr(new Page(pageClients));
    220225
  • trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h

    r100594 r101307  
    115115class WebKeyboardEvent;
    116116class WebMouseEvent;
     117class WebNotificationClient;
    117118class WebOpenPanelResultListener;
    118119class WebPageGroupProxy;
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r99509 r101307  
    141141    , m_textCheckerState()
    142142    , m_geolocationManager(this)
     143#if ENABLE(NOTIFICATIONS)
     144    , m_notificationManager(this)
     145#endif
    143146    , m_iconDatabaseProxy(this)
    144147#if ENABLE(PLUGIN_PROCESS)
  • trunk/Source/WebKit2/WebProcess/WebProcess.h

    r99483 r101307  
    4747#endif
    4848
     49#if ENABLE(NOTIFICATIONS)
     50#include "WebNotificationManager.h"
     51#endif
     52
    4953#if ENABLE(PLUGIN_PROCESS)
    5054#include "PluginProcessConnectionManager.h"
     
    120124    // Geolocation
    121125    WebGeolocationManager& geolocationManager() { return m_geolocationManager; }
     126   
     127#if ENABLE(NOTIFICATIONS)
     128    WebNotificationManager& notificationManager() { return m_notificationManager; }
     129#endif
    122130
    123131    void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
     
    242250    TextCheckerState m_textCheckerState;
    243251    WebGeolocationManager m_geolocationManager;
     252#if ENABLE(NOTIFICATIONS)
     253    WebNotificationManager m_notificationManager;
     254#endif
    244255    WebIconDatabaseProxy m_iconDatabaseProxy;
    245256   
  • trunk/Source/WebKit2/win/WebKit2.vcproj

    r100336 r101307  
    700700                        </File>
    701701                        <File
     702                                RelativePath="..\Shared\WebHitTestResult.cpp"
     703                                >
     704                        </File>
     705                        <File
     706                                RelativePath="..\Shared\WebHitTestResult.h"
     707                                >
     708                        </File>
     709                        <File
    702710                                RelativePath="..\Shared\WebImage.cpp"
    703711                                >
     
    705713                        <File
    706714                                RelativePath="..\Shared\WebImage.h"
    707                                 >
    708                         </File>
    709                         <File
    710                                 RelativePath="..\Shared\WebHitTestResult.cpp"
    711                                 >
    712                         </File>
    713                         <File
    714                                 RelativePath="..\Shared\WebHitTestResult.h"
    715715                                >
    716716                        </File>
     
    855855                                </File>
    856856                                <File
     857                                        RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.cpp"
     858                                        >
     859                                </File>
     860                                <File
     861                                        RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.h"
     862                                        >
     863                                </File>
     864                                <File
    857865                                        RelativePath="..\Shared\API\c\WKConnectionRef.cpp"
    858866                                        >
     
    863871                                </File>
    864872                                <File
    865                                         RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.cpp"
    866                                         >
    867                                 </File>
    868                                 <File
    869                                         RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.h"
    870                                         >
    871                                 </File>
    872                                 <File
    873873                                        RelativePath="..\Shared\API\c\WKContextMenuItem.cpp"
    874874                                        >
     
    915915                                </File>
    916916                                <File
     917                                        RelativePath="..\Shared\API\c\WKGeometry.cpp"
     918                                        >
     919                                </File>
     920                                <File
    917921                                        RelativePath="..\Shared\API\c\WKGeometry.h"
    918                                         >
    919                                 </File>
    920                                 <File
    921                                         RelativePath="..\Shared\API\c\WKGeometry.cpp"
    922922                                        >
    923923                                </File>
     
    18601860                                <File
    18611861                                        RelativePath="..\WebProcess\WebCoreSupport\WebInspectorFrontendClient.h"
     1862                                        >
     1863                                </File>
     1864                                <File
     1865                                        RelativePath="..\WebProcess\WebCoreSupport\WebNotificationClient.cpp"
     1866                                        >
     1867                                </File>
     1868                                <File
     1869                                        RelativePath="..\WebProcess\WebCoreSupport\WebNotificationClient.h"
    18621870                                        >
    18631871                                </File>
     
    26832691                                </Filter>
    26842692                        </Filter>
     2693                        <Filter
     2694                                Name="Notifications (User)"
     2695                                >
     2696                                <File
     2697                                        RelativePath="..\WebProcess\Notifications\WebNotificationManager.cpp"
     2698                                        >
     2699                                </File>
     2700                                <File
     2701                                        RelativePath="..\WebProcess\Notifications\WebNotificationManager.h"
     2702                                        >
     2703                                </File>
     2704                        </Filter>
    26852705                </Filter>
    26862706                <Filter
     
    30403060                        </File>
    30413061                        <File
     3062                                RelativePath="..\UIProcess\WebNotification.cpp"
     3063                                >
     3064                        </File>
     3065                        <File
     3066                                RelativePath="..\UIProcess\WebNotification.h"
     3067                                >
     3068                        </File>
     3069                        <File
     3070                                RelativePath="..\UIProcess\WebNotificationManagerProxy.cpp"
     3071                                >
     3072                        </File>
     3073                        <File
     3074                                RelativePath="..\UIProcess\WebNotificationManagerProxy.h"
     3075                                >
     3076                        </File>
     3077                        <File
     3078                                RelativePath="..\UIProcess\WebNotificationManagerProxy.messages.in"
     3079                                >
     3080                        </File>
     3081                        <File
     3082                                RelativePath="..\UIProcess\WebNotificationProvider.cpp"
     3083                                >
     3084                        </File>
     3085                        <File
     3086                                RelativePath="..\UIProcess\WebNotificationProvider.h"
     3087                                >
     3088                        </File>
     3089                        <File
    30423090                                RelativePath="..\UIProcess\WebOpenPanelResultListenerProxy.cpp"
    30433091                                >
     
    33063354                                        </File>
    33073355                                        <File
     3356                                                RelativePath="..\UIProcess\API\C\WKGrammarDetail.cpp"
     3357                                                >
     3358                                        </File>
     3359                                        <File
     3360                                                RelativePath="..\UIProcess\API\C\WKGrammarDetail.h"
     3361                                                >
     3362                                        </File>
     3363                                        <File
    33083364                                                RelativePath="..\UIProcess\API\C\WKHitTestResult.cpp"
    33093365                                                >
     
    33143370                                        </File>
    33153371                                        <File
    3316                                                 RelativePath="..\UIProcess\API\C\WKGrammarDetail.cpp"
    3317                                                 >
    3318                                         </File>
    3319                                         <File
    3320                                                 RelativePath="..\UIProcess\API\C\WKGrammarDetail.h"
    3321                                                 >
    3322                                         </File>
    3323                                         <File
    33243372                                                RelativePath="..\UIProcess\API\C\WKIconDatabase.cpp"
    33253373                                                >
     
    33633411                                        <File
    33643412                                                RelativePath="..\UIProcess\API\C\WKNavigationData.h"
     3413                                                >
     3414                                        </File>
     3415                                        <File
     3416                                                RelativePath="..\UIProcess\API\C\WKNotification.cpp"
     3417                                                >
     3418                                        </File>
     3419                                        <File
     3420                                                RelativePath="..\UIProcess\API\C\WKNotification.h"
     3421                                                >
     3422                                        </File>
     3423                                        <File
     3424                                                RelativePath="..\UIProcess\API\C\WKNotificationManager.cpp"
     3425                                                >
     3426                                        </File>
     3427                                        <File
     3428                                                RelativePath="..\UIProcess\API\C\WKNotificationManager.h"
     3429                                                >
     3430                                        </File>
     3431                                        <File
     3432                                                RelativePath="..\UIProcess\API\C\WKNotificationProvider.h"
    33653433                                                >
    33663434                                        </File>
     
    42124280                        </File>
    42134281                        <File
     4282                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebNotificationManagerProxyMessageReceiver.cpp"
     4283                                >
     4284                        </File>
     4285                        <File
     4286                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebNotificationManagerProxyMessages.h"
     4287                                >
     4288                        </File>
     4289                        <File
    42144290                                RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
    42154291                                >
Note: See TracChangeset for help on using the changeset viewer.