| Differences between
and this patch
- a/Source/JavaScriptCore/ChangeLog +8 lines
Lines 1-3 a/Source/JavaScriptCore/ChangeLog_sec1
1
2011-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
1
2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
9
2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
2
10
3
        Unreviewed prospective build fix. Touch the file to trigger correct
11
        Unreviewed prospective build fix. Touch the file to trigger correct
- a/Source/WebCore/ChangeLog +54 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-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 NOBODY (OOPS!).
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
1
2011-11-28  Ken Buchanan  <kenrb@chromium.org>
55
2011-11-28  Ken Buchanan  <kenrb@chromium.org>
2
56
3
        Crash due to bidi style in isolated run
57
        Crash due to bidi style in isolated run
- a/Source/WebKit/ChangeLog +10 lines
Lines 1-3 a/Source/WebKit/ChangeLog_sec1
1
2011-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 NOBODY (OOPS!).
8
9
        * WebKit.xcodeproj/project.pbxproj: Add WebNotificationClient class.
10
1
2011-11-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
11
2011-11-26  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2
12
3
        [CMake] Clean up Web Inspector target in Source/WebKit/blackberry/CMakeListsBlackBerry.txt
13
        [CMake] Clean up Web Inspector target in Source/WebKit/blackberry/CMakeListsBlackBerry.txt
- a/Source/WebKit/chromium/ChangeLog +19 lines
Lines 1-3 a/Source/WebKit/chromium/ChangeLog_sec1
1
2011-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 NOBODY (OOPS!).
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
1
2011-11-28  Fady Samuel  <fsamuel@chromium.org>
20
2011-11-28  Fady Samuel  <fsamuel@chromium.org>
2
21
3
        [Chromium] Fix broken DRT build for Aura Linux
22
        [Chromium] Fix broken DRT build for Aura Linux
- a/Source/WebKit/mac/ChangeLog +22 lines
Lines 1-3 a/Source/WebKit/mac/ChangeLog_sec1
1
2011-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 NOBODY (OOPS!).
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
1
2011-11-28  Adam Roben  <aroben@apple.com>
23
2011-11-28  Adam Roben  <aroben@apple.com>
2
24
3
        Properly retain the OS X version string
25
        Properly retain the OS X version string
- a/Source/WebKit/qt/ChangeLog +21 lines
Lines 1-3 a/Source/WebKit/qt/ChangeLog_sec1
1
2011-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 NOBODY (OOPS!).
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
1
2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
22
2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
2
23
3
        [Qt] Build system fixes against V8.
24
        [Qt] Build system fixes against V8.
- a/Source/WebKit2/ChangeLog +109 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2011-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 NOBODY (OOPS!).
8
9
        * WebKit2.xcodeproj/project.pbxproj: Added classes for notification support.
10
        * win/WebKit2.vcproj: Ditto.
11
        * Configurations/FeatureDefines.xcconfig: Split out ENABLE_NOTIFICATIONS based on platform.
12
        * DerivedSources.make: Add Notifications to VPATH.
13
        * Platform/CoreIPC/MessageID.h: List WebNotificationManagerProxy as a class with messages.
14
        * Scripts/webkit2/messages.py: Mark WebCore::NotificationContents as a struct.
15
16
        * Shared/API/c/WKBase.h: Map opaque types to NotificationProvider, NotificationManager, and Notification.
17
        * UIProcess/API/C/WKAPICast.h: Map WK types toNotificationProvider, NotificationManager, and Notification.
18
        * Shared/APIObject.h: Add Notification and NotificationManager as APIObjects.
19
        * Shared/UserMessageCoders.h: Added coders for WebNotification.
20
        (WebKit::UserMessageEncoder::baseEncode):
21
        (WebKit::UserMessageDecoder::baseDecode):
22
        * Shared/WebCoreArgumentCoders.cpp: Added coders for KURL.
23
        (CoreIPC::::encode):
24
        (CoreIPC::::decode):
25
        * Shared/WebCoreArgumentCoders.h:
26
        * Shared/WebNotification.cpp: Added.
27
        (WebKit::WebNotification::WebNotification):
28
        (WebKit::WebNotification::~WebNotification):
29
        (WebKit::WebNotification::encode):
30
        (WebKit::WebNotification::decode):
31
        * Shared/WebNotification.h: Added.
32
        (WebKit::WebNotification::create):
33
        (WebKit::WebNotification::title):
34
        (WebKit::WebNotification::body):
35
        (WebKit::WebNotification::type):
36
        * UIProcess/API/C/WKNotification.cpp: Added as API.
37
        (WKNotificationGetTypeID):
38
        (WKNotificationCopyTitle):
39
        (WKNotificationCopyBody):
40
        * UIProcess/API/C/WKNotification.h: Added as API.
41
42
        * WebProcess/Notifications/WebNotificationManager.h: Added. Contains for now show() and cancel().
43
        The rest of the notification client methods will be added later. These two functions send messages
44
        to the manager proxy.
45
        * WebProcess/Notifications/WebNotificationManager.cpp: Added.
46
        (WebKit::WebNotificationManager::WebNotificationManager):
47
        (WebKit::WebNotificationManager::~WebNotificationManager):
48
        (WebKit::WebNotificationManager::show):
49
        (WebKit::WebNotificationManager::cancel):
50
51
        * UIProcess/WebNotificationManagerProxy.cpp: Added.
52
        (WebKit::WebNotificationManagerProxy::create):
53
        (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy):
54
        (WebKit::WebNotificationManagerProxy::~WebNotificationManagerProxy):
55
        (WebKit::WebNotificationManagerProxy::invalidate):
56
        (WebKit::WebNotificationManagerProxy::initializeProvider):
57
        (WebKit::WebNotificationManagerProxy::didReceiveMessage):
58
        (WebKit::WebNotificationManagerProxy::show):
59
        (WebKit::WebNotificationManagerProxy::cancel):
60
        * UIProcess/WebNotificationManagerProxy.h: Added.
61
        (WebKit::WebNotificationManagerProxy::clearContext):
62
        (WebKit::WebNotificationManagerProxy::type):
63
        * UIProcess/WebNotificationManagerProxy.messages.in: Added.
64
        * UIProcess/API/C/WKNotificationManager.cpp: Added.
65
        (WKNotificationManagerGetTypeID):
66
        (WKNotificationManagerSetProvider):
67
        * UIProcess/API/C/WKNotificationManager.h: Added.
68
69
        * UIProcess/WebContext.h: Add the notification manager to the web context.
70
        (WebKit::WebContext::notificationManagerProxy): Access the manager.
71
        * UIProcess/WebContext.cpp:
72
        (WebKit::WebContext::WebContext): Boilerplate for managers.
73
        (WebKit::WebContext::~WebContext): Boilerplate for managers.
74
        (WebKit::WebContext::disconnectProcess): Boilerplate for managers.
75
        (WebKit::WebContext::didReceiveMessage): Forward messages to the notification manager.
76
        * UIProcess/API/C/WKContext.cpp: Expose as API.
77
        (WKContextGetNotificationManager):
78
        * UIProcess/API/C/WKContext.h: Expose as API.
79
80
        * UIProcess/API/C/WKNotificationProvider.h: Added.
81
        * UIProcess/WebNotificationProvider.h: Added as APIClient.
82
        * UIProcess/WebNotificationProvider.cpp: Added.
83
        (WebKit::WebNotificationProvider::show): Forward call to the client.
84
        (WebKit::WebNotificationProvider::cancel): Forward call to the client.
85
        * UIProcess/WebProcessProxy.cpp:
86
        (WebKit::WebProcessProxy::didReceiveMessage): Forward messages for notification manager to the context.
87
88
        * WebProcess/WebCoreSupport/WebChromeClient.cpp: Remove notificationPresenter().
89
        * WebProcess/WebCoreSupport/WebChromeClient.h: Remove notificationPresenter().
90
91
        * WebProcess/WebCoreSupport/WebNotificationClient.h: Added. Forwards client methods to manager.
92
        * WebProcess/WebCoreSupport/WebNotificationClient.cpp: Added. Mostly stub implementation for now.
93
        (WebKit::WebNotificationClient::WebNotificationClient):
94
        (WebKit::WebNotificationClient::~WebNotificationClient):
95
        (WebKit::WebNotificationClient::show):
96
        (WebKit::WebNotificationClient::cancel):
97
        (WebKit::WebNotificationClient::notificationObjectDestroyed):
98
        (WebKit::WebNotificationClient::requestPermission):
99
        (WebKit::WebNotificationClient::cancelRequestsForPermission):
100
        (WebKit::WebNotificationClient::checkPermission):
101
102
        * WebProcess/WebPage/WebPage.h: Added WebNotificationClient as one of its page clients.
103
        * WebProcess/WebPage/WebPage.cpp:
104
        (WebKit::WebPage::WebPage): Set the notification client to WebNotificationClient.
105
        * WebProcess/WebProcess.h: Added WebNotificationManager.
106
        (WebKit::WebProcess::notificationManager):
107
        * WebProcess/WebProcess.cpp:
108
        (WebKit::WebProcess::WebProcess): Initialize notificaton manager.
109
1
2011-11-28  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
110
2011-11-28  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2
111
3
        [Qt][WK2] Fix panning after r101179
112
        [Qt][WK2] Fix panning after r101179
- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig -1 / +4 lines
Lines 94-100 ENABLE_MEDIA_STATISTICS = ; a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig_sec1
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
95
ENABLE_MHTML = ;
95
ENABLE_MHTML = ;
96
ENABLE_MUTATION_OBSERVERS = ;
96
ENABLE_MUTATION_OBSERVERS = ;
97
ENABLE_NOTIFICATIONS = ;
97
98
ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
99
ENABLE_NOTIFICATIONS_macosx = ;
100
98
ENABLE_PAGE_VISIBILITY_API = ;
101
ENABLE_PAGE_VISIBILITY_API = ;
99
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
102
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100
ENABLE_QUOTA = ;
103
ENABLE_QUOTA = ;
- a/Source/WebCore/Configurations/FeatureDefines.xcconfig -1 / +4 lines
Lines 94-100 ENABLE_MEDIA_STATISTICS = ; a/Source/WebCore/Configurations/FeatureDefines.xcconfig_sec1
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
95
ENABLE_MHTML = ;
95
ENABLE_MHTML = ;
96
ENABLE_MUTATION_OBSERVERS = ;
96
ENABLE_MUTATION_OBSERVERS = ;
97
ENABLE_NOTIFICATIONS = ;
97
98
ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
99
ENABLE_NOTIFICATIONS_macosx = ;
100
98
ENABLE_PAGE_VISIBILITY_API = ;
101
ENABLE_PAGE_VISIBILITY_API = ;
99
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
102
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100
ENABLE_QUOTA = ;
103
ENABLE_QUOTA = ;
- a/Source/WebCore/Target.pri +2 lines
Lines 954-959 SOURCES += \ a/Source/WebCore/Target.pri_sec1
954
    loader/ThreadableLoader.cpp \
954
    loader/ThreadableLoader.cpp \
955
    notifications/Notification.cpp \
955
    notifications/Notification.cpp \
956
    notifications/NotificationCenter.cpp \
956
    notifications/NotificationCenter.cpp \
957
    notifications/NotificationController.cpp \
957
    page/animation/AnimationBase.cpp \
958
    page/animation/AnimationBase.cpp \
958
    page/animation/AnimationController.cpp \
959
    page/animation/AnimationController.cpp \
959
    page/animation/CompositeAnimation.cpp \
960
    page/animation/CompositeAnimation.cpp \
Lines 2004-2009 HEADERS += \ a/Source/WebCore/Target.pri_sec2
2004
    notifications/NotificationCenter.h \
2005
    notifications/NotificationCenter.h \
2005
    notifications/NotificationPresenter.h \
2006
    notifications/NotificationPresenter.h \
2006
    notifications/NotificationContents.h \
2007
    notifications/NotificationContents.h \
2008
    notifications/NotificationController.h \
2007
    page/animation/AnimationBase.h \
2009
    page/animation/AnimationBase.h \
2008
    page/animation/AnimationController.h \
2010
    page/animation/AnimationController.h \
2009
    page/animation/CompositeAnimation.h \
2011
    page/animation/CompositeAnimation.h \
- a/Source/WebCore/WebCore.gypi +4 lines
Lines 583-588 a/Source/WebCore/WebCore.gypi_sec1
583
            'loader/SubstituteResource.h',
583
            'loader/SubstituteResource.h',
584
            'loader/TextResourceDecoder.h',
584
            'loader/TextResourceDecoder.h',
585
            'loader/ThreadableLoader.h',
585
            'loader/ThreadableLoader.h',
586
            'loader/ThreadableLoaderClient.h',
586
            'loader/appcache/ApplicationCache.h',
587
            'loader/appcache/ApplicationCache.h',
587
            'loader/appcache/ApplicationCacheStorage.h',
588
            'loader/appcache/ApplicationCacheStorage.h',
588
            'loader/archive/Archive.h',
589
            'loader/archive/Archive.h',
Lines 605-610 a/Source/WebCore/WebCore.gypi_sec2
605
            'loader/icon/IconDatabaseBase.h',
606
            'loader/icon/IconDatabaseBase.h',
606
            'loader/icon/IconDatabaseClient.h',
607
            'loader/icon/IconDatabaseClient.h',
607
            'loader/mac/LoaderNSURLExtras.h',
608
            'loader/mac/LoaderNSURLExtras.h',
609
            'notifications/NotificationContents.h',
608
            'notifications/NotificationPresenter.h',
610
            'notifications/NotificationPresenter.h',
609
            'page/Chrome.h',
611
            'page/Chrome.h',
610
            'page/ChromeClient.h',
612
            'page/ChromeClient.h',
Lines 2948-2953 a/Source/WebCore/WebCore.gypi_sec3
2948
            'notifications/NotificationCenter.cpp',
2950
            'notifications/NotificationCenter.cpp',
2949
            'notifications/NotificationCenter.h',
2951
            'notifications/NotificationCenter.h',
2950
            'notifications/NotificationContents.h',
2952
            'notifications/NotificationContents.h',
2953
            'notifications/NotificationController.h',
2954
            'notifications/NotificationController.h',
2951
            'page/BarInfo.cpp',
2955
            'page/BarInfo.cpp',
2952
            'page/BarInfo.h',
2956
            'page/BarInfo.h',
2953
            'page/Chrome.cpp',
2957
            'page/Chrome.cpp',
- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj -2 / +12 lines
Lines 214-220 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec1
214
		0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; };
214
		0B9056190F2578BE0095FF6A /* DocumentThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056150F2578BE0095FF6A /* DocumentThreadableLoader.cpp */; };
215
		0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
215
		0B90561A0F2578BF0095FF6A /* DocumentThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056160F2578BE0095FF6A /* DocumentThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
216
		0B90561B0F2578BF0095FF6A /* ThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056170F2578BE0095FF6A /* ThreadableLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
216
		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, ); }; };
218
		0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B90561D0F257E930095FF6A /* ThreadableLoader.cpp */; };
218
		0B90561E0F257E930095FF6A /* ThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B90561D0F257E930095FF6A /* ThreadableLoader.cpp */; };
219
		0B9056F80F2685F30095FF6A /* WorkerThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056F60F2685F30095FF6A /* WorkerThreadableLoader.cpp */; };
219
		0B9056F80F2685F30095FF6A /* WorkerThreadableLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0B9056F60F2685F30095FF6A /* WorkerThreadableLoader.cpp */; };
220
		0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056F70F2685F30095FF6A /* WorkerThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
220
		0B9056F90F2685F30095FF6A /* WorkerThreadableLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B9056F70F2685F30095FF6A /* WorkerThreadableLoader.h */; settings = {ATTRIBUTES = (); }; };
Lines 802-807 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec2
802
		31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */; };
802
		31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */; };
803
		31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */; };
803
		31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */; };
804
		31288E750E3005D6003619AE /* WebKitCSSKeyframesRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */; };
804
		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, ); }; };
805
		31313F651443B35F006E2A90 /* FilterEffectRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */; };
808
		31313F651443B35F006E2A90 /* FilterEffectRenderer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */; };
806
		31313F661443B35F006E2A90 /* FilterEffectRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */; };
809
		31313F661443B35F006E2A90 /* FilterEffectRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 31313F641443B35E006E2A90 /* FilterEffectRenderer.h */; };
807
		3138A9E51474434600B0ED12 /* StyleShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3138A9E41474434600B0ED12 /* StyleShader.h */; };
810
		3138A9E51474434600B0ED12 /* StyleShader.h in Headers */ = {isa = PBXBuildFile; fileRef = 3138A9E41474434600B0ED12 /* StyleShader.h */; };
Lines 885-891 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec3
885
		33503CC71017A1B1003B47E1 /* Notification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33503CC61017A1B1003B47E1 /* Notification.cpp */; };
888
		33503CC71017A1B1003B47E1 /* Notification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33503CC61017A1B1003B47E1 /* Notification.cpp */; };
886
		3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3390CA510FFC157B00921962 /* NotificationCenter.cpp */; };
889
		3390CA550FFC157B00921962 /* NotificationCenter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3390CA510FFC157B00921962 /* NotificationCenter.cpp */; };
887
		3390CA560FFC157B00921962 /* NotificationCenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3390CA520FFC157B00921962 /* NotificationCenter.h */; };
890
		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, ); }; };
889
		339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
892
		339B5B63131DAA3200F48D02 /* CookiesStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = 339B5B62131DAA3200F48D02 /* CookiesStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
890
		33C0CCD4112C5E6200CE057D /* SecureTextInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */; };
893
		33C0CCD4112C5E6200CE057D /* SecureTextInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33C0CCD2112C5E6200CE057D /* SecureTextInput.cpp */; };
891
		33C0CCD5112C5E6200CE057D /* SecureTextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 33C0CCD3112C5E6200CE057D /* SecureTextInput.h */; };
894
		33C0CCD5112C5E6200CE057D /* SecureTextInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 33C0CCD3112C5E6200CE057D /* SecureTextInput.h */; };
Lines 7945-7950 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec4
7945
		31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframeRule.h; sourceTree = "<group>"; };
7948
		31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframeRule.h; sourceTree = "<group>"; };
7946
		31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSKeyframesRule.cpp; sourceTree = "<group>"; };
7949
		31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSKeyframesRule.cpp; sourceTree = "<group>"; };
7947
		31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframesRule.h; sourceTree = "<group>"; };
7950
		31288E710E3005D6003619AE /* WebKitCSSKeyframesRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKitCSSKeyframesRule.h; sourceTree = "<group>"; };
7951
		3128CA67147331520074C72A /* NotificationController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NotificationController.cpp; path = notifications/NotificationController.cpp; sourceTree = "<group>"; };
7952
		3128CA6A147331630074C72A /* NotificationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NotificationController.h; path = notifications/NotificationController.h; sourceTree = "<group>"; };
7948
		31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffectRenderer.cpp; sourceTree = "<group>"; };
7953
		31313F631443B35E006E2A90 /* FilterEffectRenderer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FilterEffectRenderer.cpp; sourceTree = "<group>"; };
7949
		31313F641443B35E006E2A90 /* FilterEffectRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffectRenderer.h; sourceTree = "<group>"; };
7954
		31313F641443B35E006E2A90 /* FilterEffectRenderer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FilterEffectRenderer.h; sourceTree = "<group>"; };
7950
		3138A9E41474434600B0ED12 /* StyleShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleShader.h; path = style/StyleShader.h; sourceTree = "<group>"; };
7955
		3138A9E41474434600B0ED12 /* StyleShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleShader.h; path = style/StyleShader.h; sourceTree = "<group>"; };
Lines 14796-14801 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec5
14796
				3390CA530FFC157B00921962 /* NotificationCenter.idl */,
14801
				3390CA530FFC157B00921962 /* NotificationCenter.idl */,
14797
				3390CA540FFC157B00921962 /* NotificationContents.h */,
14802
				3390CA540FFC157B00921962 /* NotificationContents.h */,
14798
				33503C9910179A74003B47E1 /* NotificationPresenter.h */,
14803
				33503C9910179A74003B47E1 /* NotificationPresenter.h */,
14804
				3128CA67147331520074C72A /* NotificationController.cpp */,
14805
				3128CA6A147331630074C72A /* NotificationController.h */,
14799
			);
14806
			);
14800
			name = notifications;
14807
			name = notifications;
14801
			sourceTree = "<group>";
14808
			sourceTree = "<group>";
Lines 24794-24799 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec6
24794
				033A6A7C147E07D200509B36 /* HTMLPropertiesCollection.h in Headers */,
24801
				033A6A7C147E07D200509B36 /* HTMLPropertiesCollection.h in Headers */,
24795
				033A6A83147E08A600509B36 /* JSHTMLPropertiesCollection.h in Headers */,
24802
				033A6A83147E08A600509B36 /* JSHTMLPropertiesCollection.h in Headers */,
24796
				7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
24803
				7AA51B6E1483B61600AD2752 /* InspectorBaseAgent.h in Headers */,
24804
				312C0C41146DC6CC0016C911 /* Notification.h in Headers */,
24805
				3128CA6B147331630074C72A /* NotificationController.h in Headers */,
24797
			);
24806
			);
24798
			runOnlyForDeploymentPostprocessing = 0;
24807
			runOnlyForDeploymentPostprocessing = 0;
24799
		};
24808
		};
Lines 27676-27681 a/Source/WebCore/WebCore.xcodeproj/project.pbxproj_sec7
27676
				033A6A7E147E07E700509B36 /* HTMLPropertiesCollection.cpp in Sources */,
27685
				033A6A7E147E07E700509B36 /* HTMLPropertiesCollection.cpp in Sources */,
27677
				033A6A81147E088600509B36 /* JSHTMLPropertiesCollection.cpp in Sources */,
27686
				033A6A81147E088600509B36 /* JSHTMLPropertiesCollection.cpp in Sources */,
27678
				7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
27687
				7AA51B6F1483B61600AD2752 /* InspectorBaseAgent.cpp in Sources */,
27688
				3128CA68147331520074C72A /* NotificationController.cpp in Sources */,
27679
			);
27689
			);
27680
			runOnlyForDeploymentPostprocessing = 0;
27690
			runOnlyForDeploymentPostprocessing = 0;
27681
		};
27691
		};
- a/Source/WebCore/loader/EmptyClients.h -4 lines
Lines 187-196 public: a/Source/WebCore/loader/EmptyClients.h_sec1
187
    virtual void reachedMaxAppCacheSize(int64_t) { }
187
    virtual void reachedMaxAppCacheSize(int64_t) { }
188
    virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) { }
188
    virtual void reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t) { }
189
189
190
#if ENABLE(NOTIFICATIONS)
191
    virtual NotificationPresenter* notificationPresenter() const { return 0; }
192
#endif
193
194
#if ENABLE(DIRECTORY_UPLOAD)
190
#if ENABLE(DIRECTORY_UPLOAD)
195
    virtual void enumerateChosenDirectory(FileChooser*) { }
191
    virtual void enumerateChosenDirectory(FileChooser*) { }
196
#endif
192
#endif
- a/Source/WebCore/notifications/Notification.cpp -2 / +7 lines
Lines 1-6 a/Source/WebCore/notifications/Notification.cpp_sec1
1
/*
1
/*
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
2
 * 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.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are
6
 * modification, are permitted provided that the following conditions are
Lines 47-52 a/Source/WebCore/notifications/Notification.cpp_sec2
47
47
48
namespace WebCore {
48
namespace WebCore {
49
49
50
Notification::Notification()
51
    : ActiveDOMObject(0, this)
52
{
53
}
54
50
Notification::Notification(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider)
55
Notification::Notification(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider)
51
    : ActiveDOMObject(context, this)
56
    : ActiveDOMObject(context, this)
52
    , m_isHTML(true)
57
    , m_isHTML(true)
Lines 80-86 Notification::Notification(const NotificationContents& contents, ScriptExecution a/Source/WebCore/notifications/Notification.cpp_sec3
80
        return;
85
        return;
81
    }
86
    }
82
87
83
    if (!contents.icon().isEmpty() && !contents.icon().isValid()) {
88
    if (!contents.icon.isEmpty() && !contents.icon.isValid()) {
84
        ec = SYNTAX_ERR;
89
        ec = SYNTAX_ERR;
85
        return;
90
        return;
86
    }
91
    }
- a/Source/WebCore/notifications/Notification.h -74 / +82 lines
Lines 1-6 a/Source/WebCore/notifications/Notification.h_sec1
1
/*
1
/*
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
2
 * 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.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions are
6
 * modification, are permitted provided that the following conditions are
Lines 49-150 a/Source/WebCore/notifications/Notification.h_sec2
49
#if ENABLE(NOTIFICATIONS)
49
#if ENABLE(NOTIFICATIONS)
50
namespace WebCore {
50
namespace WebCore {
51
51
52
    class NotificationCenter;
52
class NotificationCenter;
53
    class ResourceError;
53
class ResourceError;
54
    class ResourceResponse;
54
class ResourceResponse;
55
    class ScriptExecutionContext;
55
class ScriptExecutionContext;
56
    class ThreadableLoader;
56
class ThreadableLoader;
57
57
58
    typedef int ExceptionCode;
58
typedef int ExceptionCode;
59
59
60
    class Notification : public RefCounted<Notification>, public ActiveDOMObject, public ThreadableLoaderClient, public EventTarget {
60
class Notification : public RefCounted<Notification>, public ActiveDOMObject, public ThreadableLoaderClient, public EventTarget {
61
        WTF_MAKE_FAST_ALLOCATED;
61
    WTF_MAKE_FAST_ALLOCATED;
62
    public:
62
public:
63
        static PassRefPtr<Notification> create(const KURL& url, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider);
63
    Notification();
64
        static PassRefPtr<Notification> create(const NotificationContents& contents, ScriptExecutionContext* context, ExceptionCode& ec, PassRefPtr<NotificationCenter> provider);
64
    static PassRefPtr<Notification> create(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter> provider);
65
        
65
    static PassRefPtr<Notification> create(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter> provider);
66
        virtual ~Notification();
66
    
67
    virtual ~Notification();
68
69
    void show();
70
    void cancel();
67
71
68
        void show();
72
    bool isHTML() const { return m_isHTML; }
69
        void cancel();
73
    void setHTML(bool isHTML) { m_isHTML = isHTML; }
74
    
75
    KURL url() const { return m_notificationURL; }
76
    void setURL(KURL url) { m_notificationURL = url; }
77
    
78
    KURL iconURL() { return m_contents.icon; }
70
    
79
    
71
        bool isHTML() { return m_isHTML; }
80
    const NotificationContents& contents() const { return m_contents; }
72
        KURL url() { return m_notificationURL; }
81
    NotificationContents& contents() { return m_contents; }
73
        KURL iconURL() { return m_contents.icon(); }
74
        NotificationContents& contents() { return m_contents; }
75
82
76
        String dir() const { return m_direction; }
83
    String dir() const { return m_direction; }
77
        void setDir(const String& dir) { m_direction = dir; }
84
    void setDir(const String& dir) { m_direction = dir; }
78
        String replaceId() const { return m_replaceId; }
85
    
79
        void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
86
    String replaceId() const { return m_replaceId; }
87
    void setReplaceId(const String& replaceId) { m_replaceId = replaceId; }
80
88
81
        TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
89
    TextDirection direction() const { return dir() == "rtl" ? RTL : LTR; }
82
90
83
        DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
91
    DEFINE_ATTRIBUTE_EVENT_LISTENER(display);
84
        DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
92
    DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
85
        DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
93
    DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
86
        DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
94
    DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
87
95
88
        using RefCounted<Notification>::ref;
96
    using RefCounted<Notification>::ref;
89
        using RefCounted<Notification>::deref;
97
    using RefCounted<Notification>::deref;
90
98
91
        // EventTarget interface
99
    // EventTarget interface
92
        virtual const AtomicString& interfaceName() const;
100
    virtual const AtomicString& interfaceName() const;
93
        virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
101
    virtual ScriptExecutionContext* scriptExecutionContext() const { return ActiveDOMObject::scriptExecutionContext(); }
94
102
95
        // ActiveDOMObject interface
103
    // ActiveDOMObject interface
96
        virtual void contextDestroyed();
104
    virtual void contextDestroyed();
97
105
98
        void stopLoading();
106
    void stopLoading();
99
107
100
        SharedBuffer* iconData() { return m_iconData.get(); }
108
    SharedBuffer* iconData() { return m_iconData.get(); }
101
        void releaseIconData() { m_iconData = 0; }
109
    void releaseIconData() { m_iconData = 0; }
102
110
103
        // Deprecated. Use functions from NotificationCenter.
111
    // Deprecated. Use functions from NotificationCenter.
104
        void detachPresenter() { }
112
    void detachPresenter() { }
105
113
106
        virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
114
    virtual void didReceiveResponse(unsigned long, const ResourceResponse&);
107
        virtual void didReceiveData(const char* data, int dataLength);
115
    virtual void didReceiveData(const char* data, int dataLength);
108
        virtual void didFinishLoading(unsigned long identifier, double finishTime);
116
    virtual void didFinishLoading(unsigned long identifier, double finishTime);
109
        virtual void didFail(const ResourceError&);
117
    virtual void didFail(const ResourceError&);
110
        virtual void didFailRedirectCheck();
118
    virtual void didFailRedirectCheck();
111
119
112
    private:
120
private:
113
        Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
121
    Notification(const KURL&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
114
        Notification(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
122
    Notification(const NotificationContents&, ScriptExecutionContext*, ExceptionCode&, PassRefPtr<NotificationCenter>);
115
123
116
        // EventTarget interface
124
    // EventTarget interface
117
        virtual void refEventTarget() { ref(); }
125
    virtual void refEventTarget() { ref(); }
118
        virtual void derefEventTarget() { deref(); }
126
    virtual void derefEventTarget() { deref(); }
119
        virtual EventTargetData* eventTargetData();
127
    virtual EventTargetData* eventTargetData();
120
        virtual EventTargetData* ensureEventTargetData();
128
    virtual EventTargetData* ensureEventTargetData();
121
129
122
        void startLoading();
130
    void startLoading();
123
        void finishLoading();
131
    void finishLoading();
124
132
125
        bool m_isHTML;
133
    bool m_isHTML;
126
        KURL m_notificationURL;
134
    KURL m_notificationURL;
127
        NotificationContents m_contents;
135
    NotificationContents m_contents;
128
136
129
        String m_direction;
137
    String m_direction;
130
        String m_replaceId;
138
    String m_replaceId;
131
139
132
        enum NotificationState {
140
    enum NotificationState {
133
            Idle = 0,
141
        Idle = 0,
134
            Loading = 1,
142
        Loading = 1,
135
            Showing = 2,
143
        Showing = 2,
136
            Cancelled = 3
144
        Cancelled = 3
137
        };
145
    };
138
146
139
        NotificationState m_state;
147
    NotificationState m_state;
140
148
141
        RefPtr<NotificationCenter> m_notificationCenter;
149
    RefPtr<NotificationCenter> m_notificationCenter;
142
        
150
    
143
        EventTargetData m_eventTargetData;
151
    EventTargetData m_eventTargetData;
144
152
145
        RefPtr<ThreadableLoader> m_loader;
153
    RefPtr<ThreadableLoader> m_loader;
146
        RefPtr<SharedBuffer> m_iconData;
154
    RefPtr<SharedBuffer> m_iconData;
147
    };
155
};
148
156
149
} // namespace WebCore
157
} // namespace WebCore
150
158
- a/Source/WebCore/notifications/NotificationCenter.h -35 / +36 lines
Lines 1-5 a/Source/WebCore/notifications/NotificationCenter.h_sec1
1
/*
1
/*
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
3
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * modification, are permitted provided that the following conditions are
Lines 43-91 a/Source/WebCore/notifications/NotificationCenter.h_sec2
43
#if ENABLE(NOTIFICATIONS)
44
#if ENABLE(NOTIFICATIONS)
44
45
45
namespace WebCore {
46
namespace WebCore {
46
    
47
47
    class NotificationPresenter;
48
class NotificationPresenter;
48
    class VoidCallback;
49
class VoidCallback;
49
50
50
    class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject { 
51
class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveDOMObject {
51
    public:
52
public:
52
        static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
53
    static PassRefPtr<NotificationCenter> create(ScriptExecutionContext* context, NotificationPresenter* presenter) { return adoptRef(new NotificationCenter(context, presenter)); }
53
54
54
        PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
55
    PassRefPtr<Notification> createHTMLNotification(const String& URI, ExceptionCode& ec)
55
        {
56
    {
56
            if (!presenter()) {
57
        if (!presenter()) {
57
                ec = INVALID_STATE_ERR;
58
            ec = INVALID_STATE_ERR;
58
                return 0;
59
            return 0;
59
            }
60
        }
60
            if (URI.isEmpty()) {
61
        if (URI.isEmpty()) {
61
                ec = SYNTAX_ERR;
62
            ec = SYNTAX_ERR;
62
                return 0;
63
            return 0;
63
            }
64
            return Notification::create(scriptExecutionContext()->completeURL(URI), scriptExecutionContext(), ec, this);
65
        }
64
        }
65
        return Notification::create(scriptExecutionContext()->completeURL(URI), scriptExecutionContext(), ec, this);
66
    }
66
67
67
        PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
68
    PassRefPtr<Notification> createNotification(const String& iconURI, const String& title, const String& body, ExceptionCode& ec)
68
        {
69
    {
69
            if (!presenter()) {
70
        if (!presenter()) {
70
                ec = INVALID_STATE_ERR;
71
            ec = INVALID_STATE_ERR;
71
                return 0;
72
            return 0;
72
            }
73
            NotificationContents contents(iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI), title, body);
74
            return Notification::create(contents, scriptExecutionContext(), ec, this);
75
        }
73
        }
74
        NotificationContents contents(iconURI.isEmpty() ? KURL() : scriptExecutionContext()->completeURL(iconURI), title, body);
75
        return Notification::create(contents, scriptExecutionContext(), ec, this);
76
    }
76
77
77
        NotificationPresenter* presenter() const { return m_notificationPresenter; }
78
    NotificationPresenter* presenter() const { return m_notificationPresenter; }
78
79
79
        int checkPermission();
80
    int checkPermission();
80
        void requestPermission(PassRefPtr<VoidCallback> callback);
81
    void requestPermission(PassRefPtr<VoidCallback>);
81
82
82
        void disconnectFrame();
83
    void disconnectFrame();
83
84
84
    private:
85
private:
85
        NotificationCenter(ScriptExecutionContext*, NotificationPresenter*);
86
    NotificationCenter(ScriptExecutionContext*, NotificationPresenter*);
86
87
87
        NotificationPresenter* m_notificationPresenter;
88
    NotificationPresenter* m_notificationPresenter;
88
    };
89
};
89
90
90
} // namespace WebCore
91
} // namespace WebCore
91
92
- a/Source/WebCore/notifications/NotificationContents.h -17 / +17 lines
Lines 1-5 a/Source/WebCore/notifications/NotificationContents.h_sec1
1
/*
1
/*
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
3
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * modification, are permitted provided that the following conditions are
Lines 33-57 a/Source/WebCore/notifications/NotificationContents.h_sec2
33
34
34
#if ENABLE(NOTIFICATIONS)
35
#if ENABLE(NOTIFICATIONS)
35
36
37
#include "KURL.h"
38
#include <wtf/text/WTFString.h>
39
36
namespace WebCore {
40
namespace WebCore {
37
41
38
    class NotificationContents { 
42
struct NotificationContents { 
39
    public:
43
public:
40
        NotificationContents() {}
44
    NotificationContents() { }
41
        NotificationContents(const KURL& iconUrl, const String& title, const String& body)
45
    NotificationContents(const KURL& iconUrl, const String& notificationTitle, const String& notificationBody)
42
            : m_icon(iconUrl)
46
        : icon(iconUrl)
43
            , m_title(title)
47
        , title(notificationTitle)
44
            , m_body(body) {}
48
        , body(notificationBody)
45
49
    { }
46
        KURL icon() const { return m_icon; }
50
47
        String title() const { return m_title; }
51
    KURL icon;
48
        String body() const { return m_body; }
52
    String title;
49
53
    String body;
50
    private:
54
};
51
        KURL m_icon;
52
        String m_title;
53
        String m_body;
54
    };
55
55
56
} // namespace WebCore
56
} // namespace WebCore
57
57
- a/Source/WebCore/notifications/NotificationController.cpp +47 lines
Line 0 a/Source/WebCore/notifications/NotificationController.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
 */
25
26
#include "config.h"
27
#include "NotificationController.h"
28
29
#if ENABLE(NOTIFICATIONS)
30
31
#include "NotificationPresenter.h"
32
33
namespace WebCore {
34
35
NotificationController::NotificationController(Page* page, NotificationPresenter* client)
36
: m_page(page)
37
, m_client(client)
38
{
39
}
40
41
NotificationController::~NotificationController()
42
{
43
}
44
45
} // namespace WebCore
46
47
#endif // ENABLE(NOTIFICATIONS)
- a/Source/WebCore/notifications/NotificationController.h +55 lines
Line 0 a/Source/WebCore/notifications/NotificationController.h_sec1
1
/*
2
* Copyright (C) 2011 Apple Inc. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions
6
* are met:
7
* 1. Redistributions of source code must retain the above copyright
8
*    notice, this list of conditions and the following disclaimer.
9
* 2. Redistributions in binary form must reproduce the above copyright
10
*    notice, this list of conditions and the following disclaimer in the
11
*    documentation and/or other materials provided with the distribution.
12
*
13
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
* PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24
*/
25
26
#ifndef NotificationController_h
27
#define NotificationController_h
28
29
#if ENABLE(NOTIFICATIONS)
30
31
#include <wtf/Noncopyable.h>
32
33
namespace WebCore {
34
35
class NotificationPresenter;
36
class Page;
37
38
class NotificationController {
39
    WTF_MAKE_NONCOPYABLE(NotificationController);
40
public:
41
    NotificationController(Page*, NotificationPresenter*);
42
    ~NotificationController();
43
    
44
    NotificationPresenter* client() { return m_client; }
45
    
46
private:
47
    Page* m_page;
48
    NotificationPresenter* m_client;
49
};
50
51
} // namespace WebCore
52
53
#endif // ENABLE(NOTIFICATIONS)
54
55
#endif // NotificationController_h
- a/Source/WebCore/notifications/NotificationPresenter.h -33 / +31 lines
Lines 1-5 a/Source/WebCore/notifications/NotificationPresenter.h_sec1
1
/*
1
/*
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
2
 * Copyright (C) 2009 Google Inc. All rights reserved.
3
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions are
6
 * modification, are permitted provided that the following conditions are
Lines 34-84 a/Source/WebCore/notifications/NotificationPresenter.h_sec2
34
#include <wtf/PassRefPtr.h>
35
#include <wtf/PassRefPtr.h>
35
#include "VoidCallback.h"
36
#include "VoidCallback.h"
36
37
37
#if ENABLE(NOTIFICATIONS)
38
39
namespace WebCore {
38
namespace WebCore {
40
39
41
    class Document;
40
class Document;
42
    class Notification;
41
class Notification;
43
    class KURL;
42
class KURL;
44
    class ScriptExecutionContext;
43
class ScriptExecutionContext;
45
44
46
    class NotificationPresenter {
45
class NotificationPresenter {
47
46
48
    public:
47
public:
49
        enum Permission {
48
    enum Permission {
50
            PermissionAllowed, // User has allowed notifications
49
        PermissionAllowed, // User has allowed notifications
51
            PermissionNotAllowed, // User has not yet allowed
50
        PermissionNotAllowed, // User has not yet allowed
52
            PermissionDenied // User has explicitly denied permission
51
        PermissionDenied // User has explicitly denied permission
53
        };
52
    };
54
53
55
        virtual ~NotificationPresenter() {}
54
    // Requests that a notification be shown.
55
    virtual bool show(Notification*) = 0;
56
56
57
        // Requests that a notification be shown.
57
    // Requests that a notification that has already been shown be canceled.
58
        virtual bool show(Notification*) = 0;
58
    virtual void cancel(Notification*) = 0;
59
59
60
        // Requests that a notification that has already been shown be canceled.
60
    // Informs the presenter that a Notification object has been destroyed
61
        virtual void cancel(Notification*) = 0;
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;
62
64
63
        // Informs the presenter that a Notification object has been destroyed
65
    // Requests user permission to show desktop notifications from a particular
64
        // (such as by a page transition).  The presenter may continue showing
66
    // script context. The callback parameter should be run when the user has
65
        // the notification, but must not attempt to call the event handlers.
67
    // made a decision.
66
        virtual void notificationObjectDestroyed(Notification*) = 0;
68
    virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
67
69
68
        // Requests user permission to show desktop notifications from a particular
70
    // Cancel all outstanding requests for the ScriptExecutionContext
69
        // script context. The callback parameter should be run when the user has
71
    virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
70
        // made a decision.
71
        virtual void requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>) = 0;
72
72
73
        // Cancel all outstanding requests for the ScriptExecutionContext
73
    // Checks the current level of permission.
74
        virtual void cancelRequestsForPermission(ScriptExecutionContext*) = 0;
74
    virtual Permission checkPermission(ScriptExecutionContext*) = 0;
75
75
76
        // Checks the current level of permission.
76
protected:
77
        virtual Permission checkPermission(ScriptExecutionContext*) = 0;
77
    virtual ~NotificationPresenter() { }
78
    };
78
};
79
79
80
} // namespace WebCore
80
} // namespace WebCore
81
81
82
#endif // ENABLE(NOTIFICATIONS)
83
84
#endif // NotificationPresenter_h
82
#endif // NotificationPresenter_h
- a/Source/WebCore/page/Chrome.cpp -7 lines
Lines 508-520 void Chrome::scheduleAnimation() a/Source/WebCore/page/Chrome.cpp_sec1
508
}
508
}
509
#endif
509
#endif
510
510
511
#if ENABLE(NOTIFICATIONS)
512
NotificationPresenter* Chrome::notificationPresenter() const
513
{
514
    return m_client->notificationPresenter();
515
}
516
#endif
517
518
// --------
511
// --------
519
512
520
#if ENABLE(DASHBOARD_SUPPORT)
513
#if ENABLE(DASHBOARD_SUPPORT)
- a/Source/WebCore/page/Chrome.h -7 lines
Lines 51-59 namespace WebCore { a/Source/WebCore/page/Chrome.h_sec1
51
    class Page;
51
    class Page;
52
    class PopupMenu;
52
    class PopupMenu;
53
    class PopupMenuClient;
53
    class PopupMenuClient;
54
#if ENABLE(NOTIFICATIONS)
55
    class NotificationPresenter;
56
#endif
57
    class SearchPopupMenu;
54
    class SearchPopupMenu;
58
55
59
    struct FrameLoadRequest;
56
    struct FrameLoadRequest;
Lines 175-184 namespace WebCore { a/Source/WebCore/page/Chrome.h_sec2
175
        void focusNSView(NSView*);
172
        void focusNSView(NSView*);
176
#endif
173
#endif
177
174
178
#if ENABLE(NOTIFICATIONS)
179
        NotificationPresenter* notificationPresenter() const; 
180
#endif
181
182
        bool selectItemWritingDirectionIsNatural();
175
        bool selectItemWritingDirectionIsNatural();
183
        bool selectItemAlignmentFollowsMenuWritingDirection();
176
        bool selectItemAlignmentFollowsMenuWritingDirection();
184
        PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
177
        PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
- a/Source/WebCore/page/ChromeClient.h -8 lines
Lines 75-84 namespace WebCore { a/Source/WebCore/page/ChromeClient.h_sec1
75
    class ColorChooser;
75
    class ColorChooser;
76
#endif
76
#endif
77
77
78
#if ENABLE(NOTIFICATIONS)
79
    class NotificationPresenter;
80
#endif
81
82
    class ChromeClient {
78
    class ChromeClient {
83
    public:
79
    public:
84
        virtual void chromeDestroyed() = 0;
80
        virtual void chromeDestroyed() = 0;
Lines 204-213 namespace WebCore { a/Source/WebCore/page/ChromeClient.h_sec2
204
        virtual void dashboardRegionsChanged();
200
        virtual void dashboardRegionsChanged();
205
#endif
201
#endif
206
202
207
#if ENABLE(NOTIFICATIONS)
208
        virtual NotificationPresenter* notificationPresenter() const = 0;
209
#endif
210
211
        virtual void populateVisitedLinks();
203
        virtual void populateVisitedLinks();
212
204
213
        virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect);
205
        virtual FloatRect customHighlightRect(Node*, const AtomicString& type, const FloatRect& lineRect);
- a/Source/WebCore/page/DOMWindow.cpp -1 / +2 lines
Lines 74-79 a/Source/WebCore/page/DOMWindow.cpp_sec1
74
#include "MessageEvent.h"
74
#include "MessageEvent.h"
75
#include "Navigator.h"
75
#include "Navigator.h"
76
#include "NotificationCenter.h"
76
#include "NotificationCenter.h"
77
#include "NotificationController.h"
77
#include "Page.h"
78
#include "Page.h"
78
#include "PageGroup.h"
79
#include "PageGroup.h"
79
#include "PageTransitionEvent.h"
80
#include "PageTransitionEvent.h"
Lines 750-756 NotificationCenter* DOMWindow::webkitNotifications() const a/Source/WebCore/page/DOMWindow.cpp_sec2
750
    if (!page)
751
    if (!page)
751
        return 0;
752
        return 0;
752
753
753
    NotificationPresenter* provider = page->chrome()->notificationPresenter();
754
    NotificationPresenter* provider = page->notificationController()->client();
754
    if (provider) 
755
    if (provider) 
755
        m_notifications = NotificationCenter::create(document, provider);    
756
        m_notifications = NotificationCenter::create(document, provider);    
756
      
757
      
- a/Source/WebCore/page/Page.cpp +6 lines
Lines 53-58 a/Source/WebCore/page/Page.cpp_sec1
53
#include "MediaCanStartListener.h"
53
#include "MediaCanStartListener.h"
54
#include "Navigator.h"
54
#include "Navigator.h"
55
#include "NetworkStateNotifier.h"
55
#include "NetworkStateNotifier.h"
56
#include "NotificationController.h"
57
#include "NotificationPresenter.h"
56
#include "PageGroup.h"
58
#include "PageGroup.h"
57
#include "PluginData.h"
59
#include "PluginData.h"
58
#include "PluginView.h"
60
#include "PluginView.h"
Lines 137-142 Page::Page(PageClients& pageClients) a/Source/WebCore/page/Page.cpp_sec2
137
    , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? adoptPtr(new DeviceMotionController(pageClients.deviceMotionClient)) : nullptr)
139
    , m_deviceMotionController(RuntimeEnabledFeatures::deviceMotionEnabled() ? adoptPtr(new DeviceMotionController(pageClients.deviceMotionClient)) : nullptr)
138
    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? adoptPtr(new DeviceOrientationController(this, pageClients.deviceOrientationClient)) : nullptr)
140
    , m_deviceOrientationController(RuntimeEnabledFeatures::deviceOrientationEnabled() ? adoptPtr(new DeviceOrientationController(this, pageClients.deviceOrientationClient)) : nullptr)
139
#endif
141
#endif
142
#if ENABLE(NOTIFICATIONS)
143
    , m_notificationController(adoptPtr(new NotificationController(this, pageClients.notificationClient)))
144
#endif
140
#if ENABLE(INPUT_SPEECH)
145
#if ENABLE(INPUT_SPEECH)
141
    , m_speechInputClient(pageClients.speechInputClient)
146
    , m_speechInputClient(pageClients.speechInputClient)
142
#endif
147
#endif
Lines 1063-1068 Page::PageClients::PageClients() a/Source/WebCore/page/Page.cpp_sec3
1063
    , deviceMotionClient(0)
1068
    , deviceMotionClient(0)
1064
    , deviceOrientationClient(0)
1069
    , deviceOrientationClient(0)
1065
    , speechInputClient(0)
1070
    , speechInputClient(0)
1071
    , notificationClient(0)
1066
    , userMediaClient(0)
1072
    , userMediaClient(0)
1067
{
1073
{
1068
}
1074
}
- a/Source/WebCore/page/Page.h +9 lines
Lines 72-77 namespace WebCore { a/Source/WebCore/page/Page.h_sec1
72
    class InspectorController;
72
    class InspectorController;
73
    class MediaCanStartListener;
73
    class MediaCanStartListener;
74
    class Node;
74
    class Node;
75
    class NotificationController;
76
    class NotificationPresenter;
75
    class PageGroup;
77
    class PageGroup;
76
    class PluginData;
78
    class PluginData;
77
    class ProgressTracker;
79
    class ProgressTracker;
Lines 117-122 namespace WebCore { a/Source/WebCore/page/Page.h_sec2
117
            DeviceOrientationClient* deviceOrientationClient;
119
            DeviceOrientationClient* deviceOrientationClient;
118
            RefPtr<BackForwardList> backForwardClient;
120
            RefPtr<BackForwardList> backForwardClient;
119
            SpeechInputClient* speechInputClient;
121
            SpeechInputClient* speechInputClient;
122
            NotificationPresenter* notificationClient;
120
            UserMediaClient* userMediaClient;
123
            UserMediaClient* userMediaClient;
121
        };
124
        };
122
125
Lines 183-188 namespace WebCore { a/Source/WebCore/page/Page.h_sec3
183
        DeviceMotionController* deviceMotionController() const { return m_deviceMotionController.get(); }
186
        DeviceMotionController* deviceMotionController() const { return m_deviceMotionController.get(); }
184
        DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); }
187
        DeviceOrientationController* deviceOrientationController() const { return m_deviceOrientationController.get(); }
185
#endif
188
#endif
189
#if ENABLE(NOTIFICATIONS)
190
        NotificationController* notificationController() const { return m_notificationController.get(); }
191
#endif
186
#if ENABLE(INPUT_SPEECH)
192
#if ENABLE(INPUT_SPEECH)
187
        SpeechInput* speechInput();
193
        SpeechInput* speechInput();
188
#endif
194
#endif
Lines 365-370 namespace WebCore { a/Source/WebCore/page/Page.h_sec4
365
        OwnPtr<DeviceMotionController> m_deviceMotionController;
371
        OwnPtr<DeviceMotionController> m_deviceMotionController;
366
        OwnPtr<DeviceOrientationController> m_deviceOrientationController;
372
        OwnPtr<DeviceOrientationController> m_deviceOrientationController;
367
#endif
373
#endif
374
#if ENABLE(NOTIFICATIONS)
375
        OwnPtr<NotificationController> m_notificationController;
376
#endif
368
#if ENABLE(INPUT_SPEECH)
377
#if ENABLE(INPUT_SPEECH)
369
        SpeechInputClient* m_speechInputClient;
378
        SpeechInputClient* m_speechInputClient;
370
        OwnPtr<SpeechInput> m_speechInput;
379
        OwnPtr<SpeechInput> m_speechInput;
- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj +8 lines
Lines 74-79 a/Source/WebKit/WebKit.xcodeproj/project.pbxproj_sec1
74
		226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */ = {isa = PBXBuildFile; fileRef = 226E9E6909D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
74
		226E9E6B09D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c in Sources */ = {isa = PBXBuildFile; fileRef = 226E9E6909D0AA8200F3A2BC /* WebNetscapeDeprecatedFunctions.c */; settings = {COMPILER_FLAGS = "-Wno-deprecated-declarations"; }; };
75
		22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
75
		22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
76
		29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */; };
76
		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 */; };
77
		37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B6FB4C1063530C000FDB3B /* WebPDFDocumentExtras.h */; };
79
		37B6FB4E1063530C000FDB3B /* WebPDFDocumentExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 37B6FB4C1063530C000FDB3B /* WebPDFDocumentExtras.h */; };
78
		37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37B6FB4D1063530C000FDB3B /* WebPDFDocumentExtras.mm */; };
80
		37B6FB4F1063530C000FDB3B /* WebPDFDocumentExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37B6FB4D1063530C000FDB3B /* WebPDFDocumentExtras.mm */; };
79
		37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */ = {isa = PBXBuildFile; fileRef = 37D1DCA61065928C0068F7EF /* WebJSPDFDoc.h */; };
81
		37D1DCA81065928C0068F7EF /* WebJSPDFDoc.h in Headers */ = {isa = PBXBuildFile; fileRef = 37D1DCA61065928C0068F7EF /* WebJSPDFDoc.h */; };
Lines 454-459 a/Source/WebKit/WebKit.xcodeproj/project.pbxproj_sec2
454
		2D36FD5E03F78F9E00A80166 /* WebFormDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
456
		2D36FD5E03F78F9E00A80166 /* WebFormDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegatePrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
455
		2D81DAB203EB0B2D00A80166 /* WebFormDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
457
		2D81DAB203EB0B2D00A80166 /* WebFormDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebFormDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
456
		2D81DAB303EB0B2D00A80166 /* WebFormDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebFormDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
458
		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>"; };
457
		35081D9202B6D4D80ACA2ACA /* WebHTMLRepresentation.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; indentWidth = 4; path = WebHTMLRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
461
		35081D9202B6D4D80ACA2ACA /* WebHTMLRepresentation.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; fileEncoding = 4; indentWidth = 4; path = WebHTMLRepresentation.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
458
		35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebHTMLRepresentation.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
462
		35081D9302B6D4D80ACA2ACA /* WebHTMLRepresentation.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebHTMLRepresentation.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
459
		35081D9402B6D4D80ACA2ACA /* WebHTMLView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHTMLView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
463
		35081D9402B6D4D80ACA2ACA /* WebHTMLView.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHTMLView.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
Lines 1311-1316 a/Source/WebKit/WebKit.xcodeproj/project.pbxproj_sec3
1311
				9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */,
1315
				9345D4EB0365C5B2008635CE /* WebJavaScriptTextInputPanel.m */,
1312
				84723BE3056D719E0044BFEA /* WebKeyGenerator.h */,
1316
				84723BE3056D719E0044BFEA /* WebKeyGenerator.h */,
1313
				84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */,
1317
				84723BE4056D719E0044BFEA /* WebKeyGenerator.mm */,
1318
				31C11A6C1476552E0049A4CC /* WebNotificationClient.h */,
1319
				31C11A6D1476552E0049A4CC /* WebNotificationClient.mm */,
1314
				A58A5797143E727000125F50 /* WebOpenPanelResultListener.h */,
1320
				A58A5797143E727000125F50 /* WebOpenPanelResultListener.h */,
1315
				A58A5798143E727000125F50 /* WebOpenPanelResultListener.mm */,
1321
				A58A5798143E727000125F50 /* WebOpenPanelResultListener.mm */,
1316
				1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */,
1322
				1AA879B411CBE9BF003C664F /* WebPlatformStrategies.h */,
Lines 1625-1630 a/Source/WebKit/WebKit.xcodeproj/project.pbxproj_sec4
1625
				B82958D3132707D0000D0E79 /* CorrectionPanel.h in Headers */,
1631
				B82958D3132707D0000D0E79 /* CorrectionPanel.h in Headers */,
1626
				A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */,
1632
				A5687BDA135B791A0074CBCB /* WebNodeHighlighter.h in Headers */,
1627
				A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
1633
				A58A5799143E727000125F50 /* WebOpenPanelResultListener.h in Headers */,
1634
				31C11A6E1476552E0049A4CC /* WebNotificationClient.h in Headers */,
1628
			);
1635
			);
1629
			runOnlyForDeploymentPostprocessing = 0;
1636
			runOnlyForDeploymentPostprocessing = 0;
1630
		};
1637
		};
Lines 2010-2015 a/Source/WebKit/WebKit.xcodeproj/project.pbxproj_sec5
2010
				B82958D4132707D0000D0E79 /* CorrectionPanel.mm in Sources */,
2017
				B82958D4132707D0000D0E79 /* CorrectionPanel.mm in Sources */,
2011
				A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
2018
				A5687BDB135B791A0074CBCB /* WebNodeHighlighter.mm in Sources */,
2012
				A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
2019
				A58A579A143E727000125F50 /* WebOpenPanelResultListener.mm in Sources */,
2020
				31C11A6F1476552E0049A4CC /* WebNotificationClient.mm in Sources */,
2013
			);
2021
			);
2014
			runOnlyForDeploymentPostprocessing = 0;
2022
			runOnlyForDeploymentPostprocessing = 0;
2015
		};
2023
		};
- a/Source/WebKit/chromium/src/ChromeClientImpl.cpp -8 lines
Lines 54-60 a/Source/WebKit/chromium/src/ChromeClientImpl.cpp_sec1
54
#include "IntRect.h"
54
#include "IntRect.h"
55
#include "NavigationAction.h"
55
#include "NavigationAction.h"
56
#include "Node.h"
56
#include "Node.h"
57
#include "NotificationPresenterImpl.h"
58
#include "Page.h"
57
#include "Page.h"
59
#include "PlatformSupport.h"
58
#include "PlatformSupport.h"
60
#include "PopupContainer.h"
59
#include "PopupContainer.h"
Lines 785-797 void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, A a/Source/WebKit/chromium/src/ChromeClientImpl.cpp_sec2
785
        m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification));
784
        m_webView->client()->postAccessibilityNotification(WebAccessibilityObject(obj), toWebAccessibilityNotification(notification));
786
}
785
}
787
786
788
#if ENABLE(NOTIFICATIONS)
789
NotificationPresenter* ChromeClientImpl::notificationPresenter() const
790
{
791
    return m_webView->notificationPresenterImpl();
792
}
793
#endif
794
795
bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
787
bool ChromeClientImpl::paintCustomOverhangArea(GraphicsContext* context, const IntRect& horizontalOverhangArea, const IntRect& verticalOverhangArea, const IntRect& dirtyRect)
796
{
788
{
797
    Frame* frame = m_webView->mainFrameImpl()->frame();
789
    Frame* frame = m_webView->mainFrameImpl()->frame();
- a/Source/WebKit/chromium/src/ChromeClientImpl.h -3 lines
Lines 130-138 public: a/Source/WebKit/chromium/src/ChromeClientImpl.h_sec1
130
        WebCore::Frame*, const WTF::String& databaseName);
130
        WebCore::Frame*, const WTF::String& databaseName);
131
    virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
131
    virtual void reachedMaxAppCacheSize(int64_t spaceNeeded);
132
    virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
132
    virtual void reachedApplicationCacheOriginQuota(WebCore::SecurityOrigin*, int64_t totalSpaceNeeded);
133
#if ENABLE(NOTIFICATIONS)
134
    virtual WebCore::NotificationPresenter* notificationPresenter() const;
135
#endif
136
    virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
133
    virtual bool paintCustomOverhangArea(WebCore::GraphicsContext*, const WebCore::IntRect&, const WebCore::IntRect&, const WebCore::IntRect&);
137
    virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
134
    virtual void requestGeolocationPermissionForFrame(WebCore::Frame*, WebCore::Geolocation*);
138
    virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*);
135
    virtual void cancelGeolocationPermissionRequestForFrame(WebCore::Frame*, WebCore::Geolocation*);
- a/Source/WebKit/chromium/src/WebNotification.cpp -2 / +2 lines
Lines 88-100 WebURL WebNotification::iconURL() const a/Source/WebKit/chromium/src/WebNotification.cpp_sec1
88
WebString WebNotification::title() const
88
WebString WebNotification::title() const
89
{
89
{
90
    ASSERT(!isHTML());
90
    ASSERT(!isHTML());
91
    return m_private->contents().title();
91
    return m_private->contents().title;
92
}
92
}
93
93
94
WebString WebNotification::body() const
94
WebString WebNotification::body() const
95
{
95
{
96
    ASSERT(!isHTML());
96
    ASSERT(!isHTML());
97
    return m_private->contents().body();
97
    return m_private->contents().body;
98
}
98
}
99
99
100
WebTextDirection WebNotification::direction() const
100
WebTextDirection WebNotification::direction() const
- a/Source/WebKit/chromium/src/WebViewImpl.cpp +3 lines
Lines 394-399 WebViewImpl::WebViewImpl(WebViewClient* client) a/Source/WebKit/chromium/src/WebViewImpl.cpp_sec1
394
#endif
394
#endif
395
    pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
395
    pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
396
    pageClients.geolocationClient = m_geolocationClientProxy.get();
396
    pageClients.geolocationClient = m_geolocationClientProxy.get();
397
#if ENABLE(NOTIFICATIONS)
398
    pageClients.notificationClient = &m_notificationPresenter;
399
#endif
397
    pageClients.backForwardClient = BackForwardListChromium::create(this);
400
    pageClients.backForwardClient = BackForwardListChromium::create(this);
398
#if ENABLE(MEDIA_STREAM)
401
#if ENABLE(MEDIA_STREAM)
399
    pageClients.userMediaClient = &m_userMediaClientImpl;
402
    pageClients.userMediaClient = &m_userMediaClientImpl;
- a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig -1 / +4 lines
Lines 94-100 ENABLE_MEDIA_STATISTICS = ; a/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig_sec1
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
95
ENABLE_MHTML = ;
95
ENABLE_MHTML = ;
96
ENABLE_MUTATION_OBSERVERS = ;
96
ENABLE_MUTATION_OBSERVERS = ;
97
ENABLE_NOTIFICATIONS = ;
97
98
ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
99
ENABLE_NOTIFICATIONS_macosx = ;
100
98
ENABLE_PAGE_VISIBILITY_API = ;
101
ENABLE_PAGE_VISIBILITY_API = ;
99
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
102
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100
ENABLE_QUOTA = ;
103
ENABLE_QUOTA = ;
- a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h +49 lines
Line 0 a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#import <WebCore/NotificationPresenter.h>
27
28
namespace WebCore {
29
class ScriptExecutionContext;
30
class VoidCallback;
31
}
32
33
@class WebView;
34
35
class WebNotificationClient : public WebCore::NotificationPresenter {
36
public:
37
    WebNotificationClient(WebView *);
38
    WebView *webView() { return m_webView; }
39
40
private:
41
    virtual bool show(WebCore::Notification*) OVERRIDE;
42
    virtual void cancel(WebCore::Notification*) OVERRIDE;
43
    virtual void notificationObjectDestroyed(WebCore::Notification*) OVERRIDE;
44
    virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>) OVERRIDE;
45
    virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
46
    virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
47
48
    WebView *m_webView;
49
};
- a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm +68 lines
Line 0 a/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#import "WebNotificationClient.h"
27
28
#import <WebCore/NotImplemented.h>
29
#import <WebCore/Notification.h>
30
31
using namespace WebCore;
32
33
WebNotificationClient::WebNotificationClient(WebView *webView)
34
    : m_webView(webView)
35
{
36
}
37
38
bool WebNotificationClient::show(Notification*)
39
{
40
    notImplemented();
41
    return false;
42
}
43
44
void WebNotificationClient::cancel(Notification*)
45
{
46
    notImplemented();
47
}
48
49
void WebNotificationClient::notificationObjectDestroyed(WebCore::Notification*)
50
{
51
    notImplemented();
52
}
53
54
void WebNotificationClient::requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>)
55
{
56
    notImplemented();
57
}
58
59
void WebNotificationClient::cancelRequestsForPermission(WebCore::ScriptExecutionContext*)
60
{
61
    notImplemented();
62
}
63
64
NotificationPresenter::Permission WebNotificationClient::checkPermission(WebCore::ScriptExecutionContext*)
65
{
66
    notImplemented();
67
    return NotificationPresenter::PermissionDenied;
68
}
- a/Source/WebKit/mac/WebView/WebView.mm +4 lines
Lines 87-92 a/Source/WebKit/mac/WebView/WebView.mm_sec1
87
#import "WebNSURLRequestExtras.h"
87
#import "WebNSURLRequestExtras.h"
88
#import "WebNSViewExtras.h"
88
#import "WebNSViewExtras.h"
89
#import "WebNodeHighlight.h"
89
#import "WebNodeHighlight.h"
90
#import "WebNotificationClient.h"
90
#import "WebPDFView.h"
91
#import "WebPDFView.h"
91
#import "WebPanelAuthenticationHandler.h"
92
#import "WebPanelAuthenticationHandler.h"
92
#import "WebPlatformStrategies.h"
93
#import "WebPlatformStrategies.h"
Lines 739-744 static NSString *leakOutlookQuirksUserScriptContents() a/Source/WebKit/mac/WebView/WebView.mm_sec2
739
#if ENABLE(CLIENT_BASED_GEOLOCATION)
740
#if ENABLE(CLIENT_BASED_GEOLOCATION)
740
    pageClients.geolocationClient = new WebGeolocationClient(self);
741
    pageClients.geolocationClient = new WebGeolocationClient(self);
741
#endif
742
#endif
743
#if ENABLE(NOTIFICATIONS)
744
    pageClients.notificationClient = new WebNotificationClient(self);
745
#endif
742
#if ENABLE(DEVICE_ORIENTATION)
746
#if ENABLE(DEVICE_ORIENTATION)
743
    pageClients.deviceOrientationClient = new WebDeviceOrientationClient(self);
747
    pageClients.deviceOrientationClient = new WebDeviceOrientationClient(self);
744
#endif
748
#endif
- a/Source/WebKit/qt/Api/qwebpage.cpp +3 lines
Lines 346-351 QWebPagePrivate::QWebPagePrivate(QWebPage *qq) a/Source/WebKit/qt/Api/qwebpage.cpp_sec1
346
    else
346
    else
347
        pageClients.geolocationClient = new GeolocationClientQt(q);
347
        pageClients.geolocationClient = new GeolocationClientQt(q);
348
#endif
348
#endif
349
#if ENABLE(NOTIFICATIONS)
350
    pageClients.notificationClient = NotificationPresenterClientQt::notificationPresenter();
351
#endif
349
    page = new Page(pageClients);
352
    page = new Page(pageClients);
350
353
351
    // By default each page is put into their own unique page group, which affects popup windows
354
    // By default each page is put into their own unique page group, which affects popup windows
- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp -8 lines
Lines 49-55 a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp_sec1
49
#include "NavigationAction.h"
49
#include "NavigationAction.h"
50
#include "NetworkingContext.h"
50
#include "NetworkingContext.h"
51
#include "NotImplemented.h"
51
#include "NotImplemented.h"
52
#include "NotificationPresenterClientQt.h"
53
#include "Page.h"
52
#include "Page.h"
54
#include "PageClientQt.h"
53
#include "PageClientQt.h"
55
#include "PopupMenuQt.h"
54
#include "PopupMenuQt.h"
Lines 557-569 void ChromeClientQt::reachedApplicationCacheOriginQuota(SecurityOrigin* origin, a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp_sec2
557
    emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota, static_cast<quint64>(totalSpaceNeeded));
556
    emit m_webPage->applicationCacheQuotaExceeded(securityOrigin, defaultOriginQuota, static_cast<quint64>(totalSpaceNeeded));
558
}
557
}
559
558
560
#if ENABLE(NOTIFICATIONS)
561
NotificationPresenter* ChromeClientQt::notificationPresenter() const
562
{
563
    return NotificationPresenterClientQt::notificationPresenter();
564
}
565
#endif
566
567
void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
559
void ChromeClientQt::runOpenPanel(Frame* frame, PassRefPtr<FileChooser> prpFileChooser)
568
{
560
{
569
    RefPtr<FileChooser> fileChooser = prpFileChooser;
561
    RefPtr<FileChooser> fileChooser = prpFileChooser;
- a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h -4 lines
Lines 142-151 public: a/Source/WebKit/qt/WebCoreSupport/ChromeClientQt.h_sec1
142
    virtual void showContextMenu() { }
142
    virtual void showContextMenu() { }
143
#endif
143
#endif
144
144
145
#if ENABLE(NOTIFICATIONS)
146
    virtual NotificationPresenter* notificationPresenter() const;
147
#endif
148
149
#if USE(ACCELERATED_COMPOSITING)
145
#if USE(ACCELERATED_COMPOSITING)
150
    // This is a hook for WebCore to tell us what we need to do with the GraphicsLayers.
146
    // This is a hook for WebCore to tell us what we need to do with the GraphicsLayers.
151
    virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
147
    virtual void attachRootGraphicsLayer(Frame*, GraphicsLayer*);
- a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp -10 / +10 lines
Lines 91-97 const QString NotificationWrapper::title() const a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec1
91
#if ENABLE(NOTIFICATIONS)
91
#if ENABLE(NOTIFICATIONS)
92
    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
92
    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
93
    if (notification)
93
    if (notification)
94
        return notification->contents().title();
94
        return notification->contents().title;
95
#endif
95
#endif
96
    return QString();
96
    return QString();
97
}
97
}
Lines 101-107 const QString NotificationWrapper::message() const a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec2
101
#if ENABLE(NOTIFICATIONS)
101
#if ENABLE(NOTIFICATIONS)
102
    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
102
    Notification* notification = NotificationPresenterClientQt::notificationPresenter()->notificationForWrapper(this);
103
    if (notification)
103
    if (notification)
104
        return notification->contents().body();
104
        return notification->contents().body;
105
#endif
105
#endif
106
    return QString();
106
    return QString();
107
}
107
}
Lines 197-204 void NotificationPresenterClientQt::displayNotification(Notification* notificati a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec3
197
    if (notification->isHTML())
197
    if (notification->isHTML())
198
        message = notification->url().string();
198
        message = notification->url().string();
199
    else {
199
    else {
200
        title = notification->contents().title();
200
        title = notification->contents().title;
201
        message = notification->contents().body();
201
        message = notification->contents().body;
202
    }
202
    }
203
203
204
    if (m_platformPlugin.plugin() && m_platformPlugin.plugin()->supportsExtension(QWebKitPlatformPlugin::Notifications))
204
    if (m_platformPlugin.plugin() && m_platformPlugin.plugin()->supportsExtension(QWebKitPlatformPlugin::Notifications))
Lines 233-239 void NotificationPresenterClientQt::displayNotification(Notification* notificati a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec4
233
#ifndef QT_NO_SYSTEMTRAYICON
233
#ifndef QT_NO_SYSTEMTRAYICON
234
    wrapper->connect(wrapper->m_notificationIcon.get(), SIGNAL(messageClicked()), wrapper, SLOT(notificationClicked()));
234
    wrapper->connect(wrapper->m_notificationIcon.get(), SIGNAL(messageClicked()), wrapper, SLOT(notificationClicked()));
235
    wrapper->m_notificationIcon->show();
235
    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);
237
#endif
237
#endif
238
}
238
}
239
239
Lines 243-249 void NotificationPresenterClientQt::cancel(Notification* notification) a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec5
243
        if (notification->isHTML())
243
        if (notification->isHTML())
244
            printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
244
            printf("DESKTOP NOTIFICATION CLOSED: %s\n", QString(notification->url().string()).toUtf8().constData());
245
        else
245
        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());
247
    }
247
    }
248
248
249
    NotificationsQueue::Iterator iter = m_notifications.find(notification);
249
    NotificationsQueue::Iterator iter = m_notifications.find(notification);
Lines 283-289 void NotificationPresenterClientQt::notificationClicked(const QString& title) a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec6
283
        if (notification->isHTML())
283
        if (notification->isHTML())
284
            notificationTitle = notification->url().string();
284
            notificationTitle = notification->url().string();
285
        else
285
        else
286
            notificationTitle = notification->contents().title();
286
            notificationTitle = notification->contents().title;
287
        if (notificationTitle == title)
287
        if (notificationTitle == title)
288
            break;
288
            break;
289
        iter++;
289
        iter++;
Lines 419-425 void NotificationPresenterClientQt::detachNotification(Notification* notificatio a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec7
419
void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
419
void NotificationPresenterClientQt::dumpReplacedIdText(Notification* notification)
420
{
420
{
421
    if (notification)
421
    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());
423
}
423
}
424
424
425
void NotificationPresenterClientQt::dumpShowText(Notification* notification)
425
void NotificationPresenterClientQt::dumpShowText(Notification* notification)
Lines 429-436 void NotificationPresenterClientQt::dumpShowText(Notification* notification) a/Source/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp_sec8
429
    else {
429
    else {
430
        printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
430
        printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
431
                notification->dir() == "rtl" ? "(RTL)" : "",
431
                notification->dir() == "rtl" ? "(RTL)" : "",
432
            QString(notification->contents().icon().string()).toUtf8().constData(), QString(notification->contents().title()).toUtf8().constData(),
432
            QString(notification->contents().icon.string()).toUtf8().constData(), QString(notification->contents().title).toUtf8().constData(),
433
            QString(notification->contents().body()).toUtf8().constData());
433
            QString(notification->contents().body).toUtf8().constData());
434
    }
434
    }
435
}
435
}
436
436
- a/Source/WebKit2/Configurations/FeatureDefines.xcconfig -1 / +4 lines
Lines 94-100 ENABLE_MEDIA_STATISTICS = ; a/Source/WebKit2/Configurations/FeatureDefines.xcconfig_sec1
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
94
ENABLE_METER_TAG = ENABLE_METER_TAG;
95
ENABLE_MHTML = ;
95
ENABLE_MHTML = ;
96
ENABLE_MUTATION_OBSERVERS = ;
96
ENABLE_MUTATION_OBSERVERS = ;
97
ENABLE_NOTIFICATIONS = ;
97
98
ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(REAL_PLATFORM_NAME));
99
ENABLE_NOTIFICATIONS_macosx = ;
100
98
ENABLE_PAGE_VISIBILITY_API = ;
101
ENABLE_PAGE_VISIBILITY_API = ;
99
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
102
ENABLE_PROGRESS_TAG = ENABLE_PROGRESS_TAG;
100
ENABLE_QUOTA = ;
103
ENABLE_QUOTA = ;
- a/Source/WebKit2/DerivedSources.make +2 lines
Lines 32-37 VPATH = \ a/Source/WebKit2/DerivedSources.make_sec1
32
    $(WebKit2)/WebProcess/IconDatabase \
32
    $(WebKit2)/WebProcess/IconDatabase \
33
    $(WebKit2)/WebProcess/KeyValueStorage \
33
    $(WebKit2)/WebProcess/KeyValueStorage \
34
    $(WebKit2)/WebProcess/MediaCache \
34
    $(WebKit2)/WebProcess/MediaCache \
35
    $(WebKit2)/WebProcess/Notifications \
35
    $(WebKit2)/WebProcess/Plugins \
36
    $(WebKit2)/WebProcess/Plugins \
36
    $(WebKit2)/WebProcess/ResourceCache \
37
    $(WebKit2)/WebProcess/ResourceCache \
37
    $(WebKit2)/WebProcess/WebCoreSupport \
38
    $(WebKit2)/WebProcess/WebCoreSupport \
Lines 72-77 MESSAGE_RECEIVERS = \ a/Source/WebKit2/DerivedSources.make_sec2
72
    WebKeyValueStorageManagerProxy \
73
    WebKeyValueStorageManagerProxy \
73
    WebMediaCacheManager \
74
    WebMediaCacheManager \
74
    WebMediaCacheManagerProxy \
75
    WebMediaCacheManagerProxy \
76
    WebNotificationManagerProxy \
75
    WebPage \
77
    WebPage \
76
    WebPageProxy \
78
    WebPageProxy \
77
    WebProcess \
79
    WebProcess \
- a/Source/WebKit2/Platform/CoreIPC/MessageID.h +1 lines
Lines 67-72 enum MessageClass { a/Source/WebKit2/Platform/CoreIPC/MessageID.h_sec1
67
    MessageClassWebInspectorProxy,
67
    MessageClassWebInspectorProxy,
68
    MessageClassWebKeyValueStorageManagerProxy,
68
    MessageClassWebKeyValueStorageManagerProxy,
69
    MessageClassWebMediaCacheManagerProxy,
69
    MessageClassWebMediaCacheManagerProxy,
70
    MessageClassWebNotificationManagerProxy,
70
    MessageClassWebPageProxy,
71
    MessageClassWebPageProxy,
71
    MessageClassWebProcessProxy,
72
    MessageClassWebProcessProxy,
72
    MessageClassWebResourceCacheManagerProxy,
73
    MessageClassWebResourceCacheManagerProxy,
- a/Source/WebKit2/Scripts/webkit2/messages.py +1 lines
Lines 179-184 def struct_or_class(namespace, type): a/Source/WebKit2/Scripts/webkit2/messages.py_sec1
179
        'WebCore::Length',
179
        'WebCore::Length',
180
        'WebCore::MatrixTransformOperation',
180
        'WebCore::MatrixTransformOperation',
181
        'WebCore::Matrix3DTransformOperation',
181
        'WebCore::Matrix3DTransformOperation',
182
        'WebCore::NotificationContents',
182
        'WebCore::PerspectiveTransformOperation',
183
        'WebCore::PerspectiveTransformOperation',
183
        'WebCore::PluginInfo',
184
        'WebCore::PluginInfo',
184
        'WebCore::PrintInfo',
185
        'WebCore::PrintInfo',
- a/Source/WebKit2/Shared/API/c/WKBase.h +3 lines
Lines 95-100 typedef const struct OpaqueWKInspector* WKInspectorRef; a/Source/WebKit2/Shared/API/c/WKBase.h_sec1
95
typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
95
typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
96
typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
96
typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
97
typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
97
typedef const struct OpaqueWKNavigationData* WKNavigationDataRef;
98
typedef const struct OpaqueWKNotification* WKNotificationRef;
99
typedef const struct OpaqueWKNotificationManager* WKNotificationManagerRef;
100
typedef const struct OpaqueWKNotificationProvider* WKNotificationProviderRef;
98
typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
101
typedef const struct OpaqueWKOpenPanelParameters* WKOpenPanelParametersRef;
99
typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
102
typedef const struct OpaqueWKOpenPanelResultListener* WKOpenPanelResultListenerRef;
100
typedef const struct OpaqueWKPage* WKPageRef;
103
typedef const struct OpaqueWKPage* WKPageRef;
- a/Source/WebKit2/Shared/APIObject.h +2 lines
Lines 89-94 public: a/Source/WebKit2/Shared/APIObject.h_sec1
89
        TypeKeyValueStorageManager,
89
        TypeKeyValueStorageManager,
90
        TypeMediaCacheManager,
90
        TypeMediaCacheManager,
91
        TypeNavigationData,
91
        TypeNavigationData,
92
        TypeNotification,
93
        TypeNotificationManager,
92
        TypeOpenPanelParameters,
94
        TypeOpenPanelParameters,
93
        TypeOpenPanelResultListener,
95
        TypeOpenPanelResultListener,
94
        TypePage,
96
        TypePage,
- a/Source/WebKit2/Shared/UserMessageCoders.h +20 lines
Lines 37-42 a/Source/WebKit2/Shared/UserMessageCoders.h_sec1
37
#include "WebData.h"
37
#include "WebData.h"
38
#include "WebGeometry.h"
38
#include "WebGeometry.h"
39
#include "WebImage.h"
39
#include "WebImage.h"
40
#include "WebNotification.h"
40
#include "WebNumber.h"
41
#include "WebNumber.h"
41
#include "WebSerializedScriptValue.h"
42
#include "WebSerializedScriptValue.h"
42
#include "WebString.h"
43
#include "WebString.h"
Lines 55-60 namespace WebKit { a/Source/WebKit2/Shared/UserMessageCoders.h_sec2
55
//   - WebData -> WebData
56
//   - WebData -> WebData
56
//   - WebDouble -> WebDouble
57
//   - WebDouble -> WebDouble
57
//   - WebImage -> WebImage
58
//   - WebImage -> WebImage
59
//   - WebNotification -> WebNotification
58
//   - WebUInt64 -> WebUInt64
60
//   - WebUInt64 -> WebUInt64
59
//   - WebURL -> WebURL
61
//   - WebURL -> WebURL
60
62
Lines 173-178 public: a/Source/WebKit2/Shared/UserMessageCoders.h_sec3
173
            encoder->encode(certificateInfo->platformCertificateInfo());
175
            encoder->encode(certificateInfo->platformCertificateInfo());
174
            return true;
176
            return true;
175
        }
177
        }
178
        case APIObject::TypeNotification: {
179
            WebNotification* notification = static_cast<WebNotification*>(m_root);
180
            encoder->encode(notification->title());
181
            encoder->encode(notification->body());
182
            return true;
183
        }
176
        default:
184
        default:
177
            break;
185
            break;
178
        }
186
        }
Lines 201-206 protected: a/Source/WebKit2/Shared/UserMessageCoders.h_sec4
201
//   - WebData -> WebData
209
//   - WebData -> WebData
202
//   - WebDouble -> WebDouble
210
//   - WebDouble -> WebDouble
203
//   - WebImage -> WebImage
211
//   - WebImage -> WebImage
212
//   - WebNotification -> WebNotification
204
//   - WebUInt64 -> WebUInt64
213
//   - WebUInt64 -> WebUInt64
205
//   - WebURL -> WebURL
214
//   - WebURL -> WebURL
206
215
Lines 373-378 public: a/Source/WebKit2/Shared/UserMessageCoders.h_sec5
373
            coder.m_root = WebCertificateInfo::create(platformCertificateInfo);
382
            coder.m_root = WebCertificateInfo::create(platformCertificateInfo);
374
            break;
383
            break;
375
        }
384
        }
385
        case APIObject::TypeNotification: {
386
            String title;
387
            if (!decoder->decode(title))
388
                return false;
389
            
390
            String body;
391
            if (!decoder->decode(body))
392
                return false;
393
            coder.m_root = WebNotification::create(title, body);
394
            break;
395
        }
376
        default:
396
        default:
377
            break;
397
            break;
378
        }
398
        }
- a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp +15 lines
Lines 37-42 a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec1
37
#include <WebCore/GraphicsContext.h>
37
#include <WebCore/GraphicsContext.h>
38
#include <WebCore/GraphicsLayer.h>
38
#include <WebCore/GraphicsLayer.h>
39
#include <WebCore/Image.h>
39
#include <WebCore/Image.h>
40
#include <WebCore/KURL.h>
40
#include <WebCore/PluginData.h>
41
#include <WebCore/PluginData.h>
41
#include <WebCore/ProtectionSpace.h>
42
#include <WebCore/ProtectionSpace.h>
42
#include <WebCore/TextCheckerClient.h>
43
#include <WebCore/TextCheckerClient.h>
Lines 624-629 bool ArgumentCoder<DragSession>::decode(ArgumentDecoder* decoder, DragSession& r a/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp_sec2
624
    return true;
625
    return true;
625
}
626
}
626
627
628
void ArgumentCoder<KURL>::encode(ArgumentEncoder* encoder, const KURL& result)
629
{
630
    encoder->encode(result.string());
631
}
632
    
633
bool 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);
639
    return true;
640
}
641
627
#if PLATFORM(QT)
642
#if PLATFORM(QT)
628
643
629
void ArgumentCoder<FloatPoint3D>::encode(ArgumentEncoder* encoder, const FloatPoint3D& floatPoint3D)
644
void ArgumentCoder<FloatPoint3D>::encode(ArgumentEncoder* encoder, const FloatPoint3D& floatPoint3D)
- a/Source/WebKit2/Shared/WebCoreArgumentCoders.h +7 lines
Lines 43-48 namespace WebCore { a/Source/WebKit2/Shared/WebCoreArgumentCoders.h_sec1
43
    class IntRect;
43
    class IntRect;
44
    class IntSize;
44
    class IntSize;
45
    class KeyframeValueList;
45
    class KeyframeValueList;
46
    class KURL;
47
    class Notification;
46
    class ProtectionSpace;
48
    class ProtectionSpace;
47
    class ResourceError;
49
    class ResourceError;
48
    class ResourceRequest;
50
    class ResourceRequest;
Lines 221-226 template<> struct ArgumentCoder<WebCore::DragSession> { a/Source/WebKit2/Shared/WebCoreArgumentCoders.h_sec2
221
    static bool decode(ArgumentDecoder*, WebCore::DragSession&);
223
    static bool decode(ArgumentDecoder*, WebCore::DragSession&);
222
};
224
};
223
225
226
template<> struct ArgumentCoder<WebCore::KURL> {
227
    static void encode(ArgumentEncoder*, const WebCore::KURL&);
228
    static bool decode(ArgumentDecoder*, WebCore::KURL&);
229
};
230
224
#if PLATFORM(QT)
231
#if PLATFORM(QT)
225
template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
232
template<> struct ArgumentCoder<WebCore::FloatPoint3D> {
226
    static void encode(ArgumentEncoder*, const WebCore::FloatPoint3D&);
233
    static void encode(ArgumentEncoder*, const WebCore::FloatPoint3D&);
- a/Source/WebKit2/Shared/WebNotification.cpp +60 lines
Line 0 a/Source/WebKit2/Shared/WebNotification.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebNotification.h"
28
29
#include "ArgumentCoders.h"
30
#include "ArgumentDecoder.h"
31
#include "ArgumentEncoder.h"
32
#include "Arguments.h"
33
34
namespace WebKit {
35
36
WebNotification::WebNotification()
37
{
38
}
39
40
WebNotification::WebNotification(const String& title, const String& body)
41
    : m_title(title)
42
    , m_body(body)
43
{
44
}
45
46
WebNotification::~WebNotification()
47
{
48
}
49
50
void WebNotification::encode(CoreIPC::ArgumentEncoder* encoder) const
51
{
52
    encoder->encode(CoreIPC::In(m_title, m_body));
53
}
54
55
bool WebNotification::decode(CoreIPC::ArgumentDecoder* decoder, WebNotification& notification)
56
{
57
    return decoder->decode(CoreIPC::Out(notification.m_title, notification.m_body));
58
}
59
60
} // namespace WebKit
- a/Source/WebKit2/Shared/WebNotification.h +71 lines
Line 0 a/Source/WebKit2/Shared/WebNotification.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebNotification_h
27
#define WebNotification_h
28
29
#include "APIObject.h"
30
#include <wtf/PassRefPtr.h>
31
#include <wtf/text/WTFString.h>
32
33
namespace CoreIPC {
34
35
class ArgumentDecoder;
36
class ArgumentEncoder;
37
38
} // namespace CoreIPC
39
40
namespace WebKit {
41
    
42
class WebNotification : public APIObject {
43
public:
44
    static const Type APIType = TypeNotification;
45
    
46
    WebNotification();
47
    static PassRefPtr<WebNotification> create(const String& title, const String& body)
48
    {
49
        return adoptRef(new WebNotification(title, body));
50
    }
51
    virtual ~WebNotification();
52
    
53
    const String& title() const { return m_title; }
54
    
55
    const String& body() const { return m_body; }
56
57
    void encode(CoreIPC::ArgumentEncoder*) const;
58
    static bool decode(CoreIPC::ArgumentDecoder*, WebNotification&);
59
60
private:
61
    WebNotification(const String& title, const String& body);
62
63
    virtual Type type() const { return APIType; }
64
    
65
    String m_title;
66
    String m_body;
67
};
68
    
69
} // namespace WebKit
70
71
#endif // WebNotification_h
- a/Source/WebKit2/UIProcess/API/C/WKAPICast.h +6 lines
Lines 72-77 class WebInspectorProxy; a/Source/WebKit2/UIProcess/API/C/WKAPICast.h_sec1
72
class WebKeyValueStorageManagerProxy;
72
class WebKeyValueStorageManagerProxy;
73
class WebMediaCacheManagerProxy;
73
class WebMediaCacheManagerProxy;
74
class WebNavigationData;
74
class WebNavigationData;
75
class WebNotification;
76
class WebNotificationProvider;
77
class WebNotificationManagerProxy;
75
class WebOpenPanelParameters;
78
class WebOpenPanelParameters;
76
class WebOpenPanelResultListenerProxy;
79
class WebOpenPanelResultListenerProxy;
77
class WebPageGroup;
80
class WebPageGroup;
Lines 104-109 WK_ADD_API_MAPPING(WKIconDatabaseRef, WebIconDatabase) a/Source/WebKit2/UIProcess/API/C/WKAPICast.h_sec2
104
WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy)
107
WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy)
105
WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
108
WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
106
WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
109
WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
110
WK_ADD_API_MAPPING(WKNotificationManagerRef, WebNotificationManagerProxy)
111
WK_ADD_API_MAPPING(WKNotificationProviderRef, WebNotificationProvider)
112
WK_ADD_API_MAPPING(WKNotificationRef, WebNotification)
107
WK_ADD_API_MAPPING(WKOpenPanelParametersRef, WebOpenPanelParameters)
113
WK_ADD_API_MAPPING(WKOpenPanelParametersRef, WebOpenPanelParameters)
108
WK_ADD_API_MAPPING(WKOpenPanelResultListenerRef, WebOpenPanelResultListenerProxy)
114
WK_ADD_API_MAPPING(WKOpenPanelResultListenerRef, WebOpenPanelResultListenerProxy)
109
WK_ADD_API_MAPPING(WKPageGroupRef, WebPageGroup)
115
WK_ADD_API_MAPPING(WKPageGroupRef, WebPageGroup)
- a/Source/WebKit2/UIProcess/API/C/WKContext.cpp +5 lines
Lines 195-200 WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef contextRef) a/Source/WebKit2/UIProcess/API/C/WKContext.cpp_sec1
195
    return toAPI(toImpl(contextRef)->mediaCacheManagerProxy());
195
    return toAPI(toImpl(contextRef)->mediaCacheManagerProxy());
196
}
196
}
197
197
198
WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef contextRef)
199
{
200
    return toAPI(toImpl(contextRef)->notificationManagerProxy());
201
}
202
198
WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef contextRef)
203
WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef contextRef)
199
{
204
{
200
    return toAPI(toImpl(contextRef)->pluginSiteDataManager());
205
    return toAPI(toImpl(contextRef)->pluginSiteDataManager());
- a/Source/WebKit2/UIProcess/API/C/WKContext.h +1 lines
Lines 148-153 WK_EXPORT WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef co a/Source/WebKit2/UIProcess/API/C/WKContext.h_sec1
148
WK_EXPORT WKIconDatabaseRef WKContextGetIconDatabase(WKContextRef context);
148
WK_EXPORT WKIconDatabaseRef WKContextGetIconDatabase(WKContextRef context);
149
WK_EXPORT WKKeyValueStorageManagerRef WKContextGetKeyValueStorageManager(WKContextRef context);
149
WK_EXPORT WKKeyValueStorageManagerRef WKContextGetKeyValueStorageManager(WKContextRef context);
150
WK_EXPORT WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef context);
150
WK_EXPORT WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef context);
151
WK_EXPORT WKNotificationManagerRef WKContextGetNotificationManager(WKContextRef context);
151
WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
152
WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
152
WK_EXPORT WKResourceCacheManagerRef WKContextGetResourceCacheManager(WKContextRef context);
153
WK_EXPORT WKResourceCacheManagerRef WKContextGetResourceCacheManager(WKContextRef context);
153
    
154
    
- a/Source/WebKit2/UIProcess/API/C/WKNotification.cpp +49 lines
Line 0 a/Source/WebKit2/UIProcess/API/C/WKNotification.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WKNotification.h"
28
29
#include "WKAPICast.h"
30
#include "WebNotification.h"
31
#include "WebNotificationManagerProxy.h"
32
33
using namespace WebKit;
34
35
WKTypeID WKNotificationGetTypeID()
36
{
37
    return toAPI(WebNotification::APIType);
38
}
39
40
WKStringRef WKNotificationCopyTitle(WKNotificationRef notification)
41
{
42
    return toCopiedAPI(toImpl(notification)->title());
43
}
44
45
WKStringRef WKNotificationCopyBody(WKNotificationRef notification)
46
{
47
    return toCopiedAPI(toImpl(notification)->body());
48
}
49
- a/Source/WebKit2/UIProcess/API/C/WKNotification.h +44 lines
Line 0 a/Source/WebKit2/UIProcess/API/C/WKNotification.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WKNotification_h
27
#define WKNotification_h
28
29
#include <WebKit2/WKBase.h>
30
31
#ifdef __cplusplus
32
extern "C" {
33
#endif
34
35
WK_EXPORT WKTypeID WKNotificationGetTypeID();
36
37
WK_EXPORT WKStringRef WKNotificationCopyTitle(WKNotificationRef);
38
WK_EXPORT WKStringRef WKNotificationCopyBody(WKNotificationRef);
39
    
40
#ifdef __cplusplus
41
}
42
#endif
43
44
#endif // WKNotification_h
- a/Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp +41 lines
Line 0 a/Source/WebKit2/UIProcess/API/C/WKNotificationManager.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WKNotificationManager.h"
28
29
#include "WKAPICast.h"
30
#include "WebNotificationManagerProxy.h"
31
32
using namespace WebKit;
33
34
WKTypeID WKNotificationManagerGetTypeID()
35
{
36
    return toAPI(WebNotificationManagerProxy::APIType);
37
}
38
void WKNotificationManagerSetProvider(WKNotificationManagerRef managerRef, const WKNotificationProvider* wkProvider)
39
{
40
    toImpl(managerRef)->initializeProvider(wkProvider);
41
}
- a/Source/WebKit2/UIProcess/API/C/WKNotificationManager.h +43 lines
Line 0 a/Source/WebKit2/UIProcess/API/C/WKNotificationManager.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WKNotificationManager_h
27
#define WKNotificationManager_h
28
29
#include "WKNotificationProvider.h"
30
#include <WebKit2/WKBase.h>
31
32
#ifdef __cplusplus
33
extern "C" {
34
#endif
35
36
WK_EXPORT WKTypeID WKNotificationManagerGetTypeID();
37
WK_EXPORT void WKNotificationManagerSetProvider(WKNotificationManagerRef, const WKNotificationProvider*);
38
39
#ifdef __cplusplus
40
}
41
#endif
42
43
#endif // WKNotificationManager_h
- a/Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h +53 lines
Line 0 a/Source/WebKit2/UIProcess/API/C/WKNotificationProvider.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WKNotificationProvider_h
27
#define WKNotificationProvider_h
28
29
#include <WebKit2/WKBase.h>
30
31
#ifdef __cplusplus
32
extern "C" {
33
#endif
34
35
typedef void (*WKNotificationProviderShowCallback)(WKNotificationRef, const void* clientInfo);
36
typedef void (*WKNotificationProviderCancelCallback)(WKNotificationRef, const void* clientInfo);
37
38
struct WKNotificationProvider {
39
    int version;
40
    const void* clientInfo;
41
    WKNotificationProviderShowCallback show;
42
    WKNotificationProviderCancelCallback cancel;
43
};
44
typedef struct WKNotificationProvider WKNotificationProvider;
45
46
enum { kWKNotificationProviderCurrentVersion = 0 };
47
48
#ifdef __cplusplus
49
}
50
#endif
51
52
53
#endif // WKNotificationProvider_h
- a/Source/WebKit2/UIProcess/WebContext.cpp +11 lines
Lines 46-51 a/Source/WebKit2/UIProcess/WebContext.cpp_sec1
46
#include "WebIconDatabase.h"
46
#include "WebIconDatabase.h"
47
#include "WebKeyValueStorageManagerProxy.h"
47
#include "WebKeyValueStorageManagerProxy.h"
48
#include "WebMediaCacheManagerProxy.h"
48
#include "WebMediaCacheManagerProxy.h"
49
#include "WebNotificationManagerProxy.h"
49
#include "WebPluginSiteDataManager.h"
50
#include "WebPluginSiteDataManager.h"
50
#include "WebPageGroup.h"
51
#include "WebPageGroup.h"
51
#include "WebMemorySampler.h"
52
#include "WebMemorySampler.h"
Lines 131-136 WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa a/Source/WebKit2/UIProcess/WebContext.cpp_sec2
131
    , m_iconDatabase(WebIconDatabase::create(this))
132
    , m_iconDatabase(WebIconDatabase::create(this))
132
    , m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
133
    , m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
133
    , m_mediaCacheManagerProxy(WebMediaCacheManagerProxy::create(this))
134
    , m_mediaCacheManagerProxy(WebMediaCacheManagerProxy::create(this))
135
    , m_notificationManagerProxy(WebNotificationManagerProxy::create(this))
134
    , m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
136
    , m_pluginSiteDataManager(WebPluginSiteDataManager::create(this))
135
    , m_resourceCacheManagerProxy(WebResourceCacheManagerProxy::create(this))
137
    , m_resourceCacheManagerProxy(WebResourceCacheManagerProxy::create(this))
136
#if PLATFORM(WIN)
138
#if PLATFORM(WIN)
Lines 181-186 WebContext::~WebContext() a/Source/WebKit2/UIProcess/WebContext.cpp_sec3
181
183
182
    m_mediaCacheManagerProxy->invalidate();
184
    m_mediaCacheManagerProxy->invalidate();
183
    m_mediaCacheManagerProxy->clearContext();
185
    m_mediaCacheManagerProxy->clearContext();
186
    
187
    m_notificationManagerProxy->invalidate();
188
    m_notificationManagerProxy->clearContext();
184
189
185
    m_pluginSiteDataManager->invalidate();
190
    m_pluginSiteDataManager->invalidate();
186
    m_pluginSiteDataManager->clearContext();
191
    m_pluginSiteDataManager->clearContext();
Lines 369-374 void WebContext::disconnectProcess(WebProcessProxy* process) a/Source/WebKit2/UIProcess/WebContext.cpp_sec4
369
    m_geolocationManagerProxy->invalidate();
374
    m_geolocationManagerProxy->invalidate();
370
    m_keyValueStorageManagerProxy->invalidate();
375
    m_keyValueStorageManagerProxy->invalidate();
371
    m_mediaCacheManagerProxy->invalidate();
376
    m_mediaCacheManagerProxy->invalidate();
377
    m_notificationManagerProxy->invalidate();
372
    m_resourceCacheManagerProxy->invalidate();
378
    m_resourceCacheManagerProxy->invalidate();
373
379
374
    // When out of process plug-ins are enabled, we don't want to invalidate the plug-in site data
380
    // When out of process plug-ins are enabled, we don't want to invalidate the plug-in site data
Lines 695-700 void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::Mes a/Source/WebKit2/UIProcess/WebContext.cpp_sec5
695
        m_mediaCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
701
        m_mediaCacheManagerProxy->didReceiveMessage(connection, messageID, arguments);
696
        return;
702
        return;
697
    }
703
    }
704
    
705
    if (messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()) {
706
        m_notificationManagerProxy->didReceiveMessage(connection, messageID, arguments);
707
        return;
708
    }
698
709
699
    if (messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
710
    if (messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
700
        m_resourceCacheManagerProxy->didReceiveWebResourceCacheManagerProxyMessage(connection, messageID, arguments);
711
        m_resourceCacheManagerProxy->didReceiveWebResourceCacheManagerProxyMessage(connection, messageID, arguments);
- a/Source/WebKit2/UIProcess/WebContext.h +3 lines
Lines 54-59 class WebGeolocationManagerProxy; a/Source/WebKit2/UIProcess/WebContext.h_sec1
54
class WebIconDatabase;
54
class WebIconDatabase;
55
class WebKeyValueStorageManagerProxy;
55
class WebKeyValueStorageManagerProxy;
56
class WebMediaCacheManagerProxy;
56
class WebMediaCacheManagerProxy;
57
class WebNotificationManagerProxy;
57
class WebPageGroup;
58
class WebPageGroup;
58
class WebPageProxy;
59
class WebPageProxy;
59
class WebResourceCacheManagerProxy;
60
class WebResourceCacheManagerProxy;
Lines 157-162 public: a/Source/WebKit2/UIProcess/WebContext.h_sec2
157
    WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
158
    WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
158
    WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
159
    WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
159
    WebMediaCacheManagerProxy* mediaCacheManagerProxy() const { return m_mediaCacheManagerProxy.get(); }
160
    WebMediaCacheManagerProxy* mediaCacheManagerProxy() const { return m_mediaCacheManagerProxy.get(); }
161
    WebNotificationManagerProxy* notificationManagerProxy() const { return m_notificationManagerProxy.get(); }
160
    WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
162
    WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
161
    WebResourceCacheManagerProxy* resourceCacheManagerProxy() const { return m_resourceCacheManagerProxy.get(); }
163
    WebResourceCacheManagerProxy* resourceCacheManagerProxy() const { return m_resourceCacheManagerProxy.get(); }
162
164
Lines 282-287 private: a/Source/WebKit2/UIProcess/WebContext.h_sec3
282
    RefPtr<WebIconDatabase> m_iconDatabase;
284
    RefPtr<WebIconDatabase> m_iconDatabase;
283
    RefPtr<WebKeyValueStorageManagerProxy> m_keyValueStorageManagerProxy;
285
    RefPtr<WebKeyValueStorageManagerProxy> m_keyValueStorageManagerProxy;
284
    RefPtr<WebMediaCacheManagerProxy> m_mediaCacheManagerProxy;
286
    RefPtr<WebMediaCacheManagerProxy> m_mediaCacheManagerProxy;
287
    RefPtr<WebNotificationManagerProxy> m_notificationManagerProxy;
285
    RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
288
    RefPtr<WebPluginSiteDataManager> m_pluginSiteDataManager;
286
    RefPtr<WebResourceCacheManagerProxy> m_resourceCacheManagerProxy;
289
    RefPtr<WebResourceCacheManagerProxy> m_resourceCacheManagerProxy;
287
290
- a/Source/WebKit2/UIProcess/WebNotificationManagerProxy.cpp +77 lines
Line 0 a/Source/WebKit2/UIProcess/WebNotificationManagerProxy.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebNotificationManagerProxy.h"
28
29
#include "WebContext.h"
30
#include "WebNotification.h"
31
#include <WebCore/NotificationContents.h>
32
33
using namespace WTF;
34
using namespace WebCore;
35
36
namespace WebKit {
37
38
PassRefPtr<WebNotificationManagerProxy> WebNotificationManagerProxy::create(WebContext* context)
39
{
40
    return adoptRef(new WebNotificationManagerProxy(context));
41
}
42
43
WebNotificationManagerProxy::WebNotificationManagerProxy(WebContext* context)
44
    : m_context(context)
45
{
46
}
47
48
WebNotificationManagerProxy::~WebNotificationManagerProxy()
49
{
50
}
51
52
void WebNotificationManagerProxy::invalidate()
53
{
54
}
55
56
void WebNotificationManagerProxy::initializeProvider(const WKNotificationProvider *provider)
57
{
58
    m_provider.initialize(provider);
59
}
60
61
void WebNotificationManagerProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
62
{
63
    didReceiveWebNotificationManagerProxyMessage(connection, messageID, arguments);
64
}
65
66
void WebNotificationManagerProxy::show(const String& title, const String& body, uint64_t notificationID)
67
{
68
    RefPtr<WebNotification> notification = WebNotification::create(title, body);
69
    m_provider.show(notification.get());
70
}
71
72
void WebNotificationManagerProxy::cancel(uint64_t notificationID)
73
{
74
    m_provider.cancel(0);
75
}
76
77
} // namespace WebKit
- a/Source/WebKit2/UIProcess/WebNotificationManagerProxy.h +74 lines
Line 0 a/Source/WebKit2/UIProcess/WebNotificationManagerProxy.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebNotificationManagerProxy_h
27
#define WebNotificationManagerProxy_h
28
29
#include "APIObject.h"
30
#include "MessageID.h"
31
#include "WebNotificationProvider.h"
32
#include <wtf/PassRefPtr.h>
33
34
namespace CoreIPC {
35
class ArgumentDecoder;
36
class Connection;
37
}
38
39
namespace WebKit {
40
41
class WebContext;
42
43
class WebNotificationManagerProxy : public APIObject {
44
public:
45
    static const Type APIType = TypeNotificationManager;
46
    
47
    static PassRefPtr<WebNotificationManagerProxy> create(WebContext*);
48
    virtual ~WebNotificationManagerProxy();
49
    
50
    void invalidate();
51
    void clearContext() { m_context = 0; }
52
53
    void initializeProvider(const WKNotificationProvider*);
54
    
55
    void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
56
57
private:
58
    explicit WebNotificationManagerProxy(WebContext*);
59
    
60
    virtual Type type() const { return APIType; }
61
    
62
    void didReceiveWebNotificationManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*);
63
    
64
    // Message handlers
65
    void show(const WTF::String& title, const WTF::String& body, uint64_t notificationID);
66
    void cancel(uint64_t notificationID);
67
    
68
    WebContext* m_context;
69
    WebNotificationProvider m_provider;
70
};
71
72
} // namespace WebKit
73
74
#endif // WebNotificationManagerProxy_h
- a/Source/WebKit2/UIProcess/WebNotificationManagerProxy.messages.in +26 lines
Line 0 a/Source/WebKit2/UIProcess/WebNotificationManagerProxy.messages.in_sec1
1
# Copyright (C) 2011 Apple Inc. All rights reserved.
2
#
3
# Redistribution and use in source and binary forms, with or without
4
# modification, are permitted provided that the following conditions
5
# are met:
6
# 1.  Redistributions of source code must retain the above copyright
7
#     notice, this list of conditions and the following disclaimer.
8
# 2.  Redistributions in binary form must reproduce the above copyright
9
#     notice, this list of conditions and the following disclaimer in the
10
#     documentation and/or other materials provided with the distribution.
11
#
12
# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
13
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15
# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23
messages -> WebNotificationManagerProxy {
24
    Show(WTF::String title, WTF::String body, uint64_t notificationID);
25
    Cancel(uint64_t notificationID);
26
}
- a/Source/WebKit2/UIProcess/WebNotificationProvider.cpp +50 lines
Line 0 a/Source/WebKit2/UIProcess/WebNotificationProvider.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebNotificationProvider.h"
28
29
#include "WKAPICast.h"
30
#include "WebNotification.h"
31
32
namespace WebKit {
33
34
void WebNotificationProvider::show(WebNotification* notification)
35
{
36
    if (!m_client.show)
37
        return;
38
    
39
    m_client.show(toAPI(notification), m_client.clientInfo);
40
}
41
42
void WebNotificationProvider::cancel(WebNotification* notification)
43
{
44
    if (!m_client.cancel)
45
        return;
46
    
47
    m_client.cancel(toAPI(notification), m_client.clientInfo);
48
}
49
50
} // namespace WebKit
- a/Source/WebKit2/UIProcess/WebNotificationProvider.h +45 lines
Line 0 a/Source/WebKit2/UIProcess/WebNotificationProvider.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebNotificationProvider_h
27
#define WebNotificationProvider_h
28
29
#include "APIClient.h"
30
#include "WKNotificationProvider.h"
31
#include <wtf/Forward.h>
32
33
namespace WebKit {
34
35
class WebNotification;
36
    
37
class WebNotificationProvider : public APIClient<WKNotificationProvider, kWKNotificationProviderCurrentVersion> {
38
public:
39
    void show(WebNotification*);
40
    void cancel(WebNotification*);
41
};
42
43
} // namespace WebKit
44
45
#endif // WebNotificationProvider_h
- a/Source/WebKit2/UIProcess/WebProcessProxy.cpp +1 lines
Lines 302-307 void WebProcessProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC a/Source/WebKit2/UIProcess/WebProcessProxy.cpp_sec1
302
        || messageID.is<CoreIPC::MessageClassWebIconDatabase>()
302
        || messageID.is<CoreIPC::MessageClassWebIconDatabase>()
303
        || messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()
303
        || messageID.is<CoreIPC::MessageClassWebKeyValueStorageManagerProxy>()
304
        || messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()
304
        || messageID.is<CoreIPC::MessageClassWebMediaCacheManagerProxy>()
305
        || messageID.is<CoreIPC::MessageClassWebNotificationManagerProxy>()
305
        || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
306
        || messageID.is<CoreIPC::MessageClassWebResourceCacheManagerProxy>()) {
306
        m_context->didReceiveMessage(connection, messageID, arguments);
307
        m_context->didReceiveMessage(connection, messageID, arguments);
307
        return;
308
        return;
- a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj +76 lines
Lines 246-251 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec1
246
		1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */; };
246
		1CA8B954127C891500576C2B /* WebInspectorMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C8E2DAD1278C5B200BC7BD0 /* WebInspectorMac.mm */; };
247
		29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */; };
247
		29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */; };
248
		29CD55AB128E294F00133C85 /* WKAccessibilityWebPageObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */; };
248
		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
		31792A541472F742003F831A /* WebNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31792A521472F740003F831A /* WebNotification.cpp */; };
258
		31792A551472F742003F831A /* WebNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 31792A531472F741003F831A /* WebNotification.h */; };
259
		318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */; };
260
		318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */; };
261
		318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17014743DB100A8FBB2 /* WKNotificationManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
262
		318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */; };
263
		318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 318BE17614743E6000A8FBB2 /* WKNotification.cpp */; };
264
		318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 318BE17814743E6A00A8FBB2 /* WKNotification.h */; settings = {ATTRIBUTES = (Private, ); }; };
249
		31EA25D2134F78C0005B1452 /* NativeWebMouseEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */; };
265
		31EA25D2134F78C0005B1452 /* NativeWebMouseEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */; };
250
		330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */; };
266
		330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */; };
251
		330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934441315B9220097A7BC /* WebCookieManagerMessages.h */; };
267
		330934481315B9220097A7BC /* WebCookieManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 330934441315B9220097A7BC /* WebCookieManagerMessages.h */; };
Lines 1200-1205 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec2
1200
		1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxyMessages.h; sourceTree = "<group>"; };
1216
		1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxyMessages.h; sourceTree = "<group>"; };
1201
		29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObject.h; sourceTree = "<group>"; };
1217
		29CD55A8128E294F00133C85 /* WKAccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObject.h; sourceTree = "<group>"; };
1202
		29CD55A9128E294F00133C85 /* WKAccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObject.mm; sourceTree = "<group>"; };
1218
		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
		31792A521472F740003F831A /* WebNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotification.cpp; sourceTree = "<group>"; };
1230
		31792A531472F741003F831A /* WebNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotification.h; sourceTree = "<group>"; };
1231
		318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebNotificationManagerProxyMessageReceiver.cpp; sourceTree = "<group>"; };
1232
		318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManagerProxyMessages.h; sourceTree = "<group>"; };
1233
		318BE17014743DB100A8FBB2 /* WKNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNotificationManager.h; sourceTree = "<group>"; };
1234
		318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotificationManager.cpp; sourceTree = "<group>"; };
1235
		318BE17614743E6000A8FBB2 /* WKNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKNotification.cpp; sourceTree = "<group>"; };
1236
		318BE17814743E6A00A8FBB2 /* WKNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKNotification.h; sourceTree = "<group>"; };
1203
		31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeWebMouseEventMac.mm; sourceTree = "<group>"; };
1237
		31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NativeWebMouseEventMac.mm; sourceTree = "<group>"; };
1204
		31EA25D3134F78D6005B1452 /* NativeWebMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebMouseEvent.h; sourceTree = "<group>"; };
1238
		31EA25D3134F78D6005B1452 /* NativeWebMouseEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeWebMouseEvent.h; sourceTree = "<group>"; };
1205
		32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };
1239
		32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };
Lines 2296-2301 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec3
2296
				905620E912BC248B000799B6 /* WebMemorySampler.h */,
2330
				905620E912BC248B000799B6 /* WebMemorySampler.h */,
2297
				C0337DAF127A28D0008FF4F4 /* WebMouseEvent.cpp */,
2331
				C0337DAF127A28D0008FF4F4 /* WebMouseEvent.cpp */,
2298
				BCF69F981176CED600471A52 /* WebNavigationDataStore.h */,
2332
				BCF69F981176CED600471A52 /* WebNavigationDataStore.h */,
2333
				31792A521472F740003F831A /* WebNotification.cpp */,
2334
				31792A531472F741003F831A /* WebNotification.h */,
2299
				BC33DD671238464600360F3F /* WebNumber.h */,
2335
				BC33DD671238464600360F3F /* WebNumber.h */,
2300
				BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */,
2336
				BC857FB412B830E600EDEB2E /* WebOpenPanelParameters.cpp */,
2301
				BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */,
2337
				BC857FB312B830E600EDEB2E /* WebOpenPanelParameters.h */,
Lines 2426-2431 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec4
2426
			path = mac;
2462
			path = mac;
2427
			sourceTree = "<group>";
2463
			sourceTree = "<group>";
2428
		};
2464
		};
2465
		31099974146C8AA80029DEB9 /* Notifications (User) */ = {
2466
			isa = PBXGroup;
2467
			children = (
2468
				31099978146C8B140029DEB9 /* WebNotificationManager.cpp */,
2469
				31099979146C8B140029DEB9 /* WebNotificationManager.h */,
2470
			);
2471
			name = "Notifications (User)";
2472
			sourceTree = "<group>";
2473
		};
2429
		32C88DFF0371C24200C91783 /* Other Sources */ = {
2474
		32C88DFF0371C24200C91783 /* Other Sources */ = {
2430
			isa = PBXGroup;
2475
			isa = PBXGroup;
2431
			children = (
2476
			children = (
Lines 2593-2598 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec5
2593
				51A9E0FB1315CC0E009E7031 /* KeyValueStorage */,
2638
				51A9E0FB1315CC0E009E7031 /* KeyValueStorage */,
2594
				1A6FA01C11E1526300DB1371 /* mac */,
2639
				1A6FA01C11E1526300DB1371 /* mac */,
2595
				33D3A3BD1339609800709BE4 /* MediaCache */,
2640
				33D3A3BD1339609800709BE4 /* MediaCache */,
2641
				31099974146C8AA80029DEB9 /* Notifications (User) */,
2596
				1A6FB7AA11E64B4900DB1371 /* Plugins */,
2642
				1A6FB7AA11E64B4900DB1371 /* Plugins */,
2597
				3336762B130C9978006C9DE2 /* ResourceCache */,
2643
				3336762B130C9978006C9DE2 /* ResourceCache */,
2598
				BC032D5D10F437220058C15A /* WebCoreSupport */,
2644
				BC032D5D10F437220058C15A /* WebCoreSupport */,
Lines 2632-2637 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec6
2632
				BC032D6D10F4378D0058C15A /* WebInspectorClient.h */,
2678
				BC032D6D10F4378D0058C15A /* WebInspectorClient.h */,
2633
				1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */,
2679
				1C8E256B1270DE3800BC7BD0 /* WebInspectorFrontendClient.cpp */,
2634
				1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */,
2680
				1C8E256A1270DE3800BC7BD0 /* WebInspectorFrontendClient.h */,
2681
				31099971146C759B0029DEB9 /* WebNotificationClient.cpp */,
2682
				31099968146C71F50029DEB9 /* WebNotificationClient.h */,
2635
				1A3E736011CC2659007BD539 /* WebPlatformStrategies.cpp */,
2683
				1A3E736011CC2659007BD539 /* WebPlatformStrategies.cpp */,
2636
				1A3E735F11CC2659007BD539 /* WebPlatformStrategies.h */,
2684
				1A3E735F11CC2659007BD539 /* WebPlatformStrategies.h */,
2637
				D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */,
2685
				D3B9484211FF4B6500032B39 /* WebPopupMenu.cpp */,
Lines 2782-2787 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec7
2782
				33D3A3B91339606200709BE4 /* WebMediaCacheManagerProxy.messages.in */,
2830
				33D3A3B91339606200709BE4 /* WebMediaCacheManagerProxy.messages.in */,
2783
				BCF69FA11176D01400471A52 /* WebNavigationData.cpp */,
2831
				BCF69FA11176D01400471A52 /* WebNavigationData.cpp */,
2784
				BCF69FA01176D01400471A52 /* WebNavigationData.h */,
2832
				BCF69FA01176D01400471A52 /* WebNavigationData.h */,
2833
				3109996B146C73B10029DEB9 /* WebNotificationManagerProxy.cpp */,
2834
				3109996A146C73920029DEB9 /* WebNotificationManagerProxy.h */,
2835
				3109996D146C73C40029DEB9 /* WebNotificationManagerProxy.messages.in */,
2836
				312C0C46146DDBBC0016C911 /* WebNotificationProvider.cpp */,
2837
				312C0C48146DDBD30016C911 /* WebNotificationProvider.h */,
2785
				BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
2838
				BC1DFEA312B31F87005DF730 /* WebOpenPanelResultListenerProxy.cpp */,
2786
				BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
2839
				BC1DFEA212B31F87005DF730 /* WebOpenPanelResultListenerProxy.h */,
2787
				5153569A1291B1D2000749DC /* WebPageContextMenuClient.cpp */,
2840
				5153569A1291B1D2000749DC /* WebPageContextMenuClient.cpp */,
Lines 2876-2881 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec8
2876
				C09AE5E8125257C20025825D /* WKNativeEvent.h */,
2929
				C09AE5E8125257C20025825D /* WKNativeEvent.h */,
2877
				BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */,
2930
				BCF69FA81176D1CB00471A52 /* WKNavigationData.cpp */,
2878
				BCF69FA71176D1CB00471A52 /* WKNavigationData.h */,
2931
				BCF69FA71176D1CB00471A52 /* WKNavigationData.h */,
2932
				318BE17614743E6000A8FBB2 /* WKNotification.cpp */,
2933
				318BE17814743E6A00A8FBB2 /* WKNotification.h */,
2934
				318BE17414743DD600A8FBB2 /* WKNotificationManager.cpp */,
2935
				318BE17014743DB100A8FBB2 /* WKNotificationManager.h */,
2936
				312C0C49146DDC8A0016C911 /* WKNotificationProvider.h */,
2879
				BC857FE512B843D800EDEB2E /* WKOpenPanelParameters.cpp */,
2937
				BC857FE512B843D800EDEB2E /* WKOpenPanelParameters.cpp */,
2880
				BC857FE412B843D800EDEB2E /* WKOpenPanelParameters.h */,
2938
				BC857FE412B843D800EDEB2E /* WKOpenPanelParameters.h */,
2881
				BC1DFE8E12B31CA8005DF730 /* WKOpenPanelResultListener.cpp */,
2939
				BC1DFE8E12B31CA8005DF730 /* WKOpenPanelResultListener.cpp */,
Lines 3445-3450 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec9
3445
				33D3A3C51339617900709BE4 /* WebMediaCacheManagerMessages.h */,
3503
				33D3A3C51339617900709BE4 /* WebMediaCacheManagerMessages.h */,
3446
				33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */,
3504
				33D3A3C61339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp */,
3447
				33D3A3C71339617900709BE4 /* WebMediaCacheManagerProxyMessages.h */,
3505
				33D3A3C71339617900709BE4 /* WebMediaCacheManagerProxyMessages.h */,
3506
				318BE1651473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp */,
3507
				318BE1661473433700A8FBB2 /* WebNotificationManagerProxyMessages.h */,
3448
				C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
3508
				C0CE729E1247E71D00BC0EC4 /* WebPageMessageReceiver.cpp */,
3449
				C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
3509
				C0CE729F1247E71D00BC0EC4 /* WebPageMessages.h */,
3450
				BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,
3510
				BCBD3912125BB1A800D2C29F /* WebPageProxyMessageReceiver.cpp */,
Lines 3966-3971 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec10
3966
				BC4A6292147312BE006C681A /* WebConnectionClient.h in Headers */,
4026
				BC4A6292147312BE006C681A /* WebConnectionClient.h in Headers */,
3967
				BC4A6297147313A0006C681A /* WKConnectionRef.h in Headers */,
4027
				BC4A6297147313A0006C681A /* WKConnectionRef.h in Headers */,
3968
				3788A05C14743C90006319E5 /* WKBrowsingContextControllerPrivate.h in Headers */,
4028
				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
				31792A551472F742003F831A /* WebNotification.h in Headers */,
4034
				318BE1681473433700A8FBB2 /* WebNotificationManagerProxyMessages.h in Headers */,
4035
				318BE17114743DB100A8FBB2 /* WKNotificationManager.h in Headers */,
4036
				318BE17914743E6F00A8FBB2 /* WKNotification.h in Headers */,
3969
			);
4037
			);
3970
			runOnlyForDeploymentPostprocessing = 0;
4038
			runOnlyForDeploymentPostprocessing = 0;
3971
		};
4039
		};
Lines 4666-4671 a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj_sec11
4666
				BC4A628F147312BE006C681A /* WebConnection.cpp in Sources */,
4734
				BC4A628F147312BE006C681A /* WebConnection.cpp in Sources */,
4667
				BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */,
4735
				BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */,
4668
				BC4A6296147313A0006C681A /* WKConnectionRef.cpp in Sources */,
4736
				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
				31792A541472F742003F831A /* WebNotification.cpp in Sources */,
4742
				318BE1671473433700A8FBB2 /* WebNotificationManagerProxyMessageReceiver.cpp in Sources */,
4743
				318BE17514743DD700A8FBB2 /* WKNotificationManager.cpp in Sources */,
4744
				318BE17714743E6000A8FBB2 /* WKNotification.cpp in Sources */,
4669
			);
4745
			);
4670
			runOnlyForDeploymentPostprocessing = 0;
4746
			runOnlyForDeploymentPostprocessing = 0;
4671
		};
4747
		};
- a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp +65 lines
Line 0 a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebNotificationManager.h"
28
29
#if ENABLE(NOTIFICATIONS)
30
#include "WebNotificationManagerProxyMessages.h"
31
#endif
32
#include "WebPage.h"
33
#include "WebProcess.h"
34
#if ENABLE(NOTIFICATIONS)
35
#include <WebCore/Notification.h>
36
#endif
37
38
using namespace WebCore;
39
40
namespace WebKit {
41
    
42
WebNotificationManager::WebNotificationManager(WebProcess* process)
43
    : m_process(process)
44
{ }
45
46
WebNotificationManager::~WebNotificationManager()
47
{
48
}
49
50
bool WebNotificationManager::show(Notification* notification, WebPage* page)
51
{
52
#if ENABLE(NOTIFICATIONS)
53
    m_process->connection()->send(Messages::WebNotificationManagerProxy::Show(notification->contents().title, notification->contents().body, 0), page->pageID());
54
#endif
55
    return true;
56
}
57
58
void WebNotificationManager::cancel(Notification* notification, WebPage* page)
59
{
60
#if ENABLE(NOTIFICATIONS)
61
    m_process->connection()->send(Messages::WebNotificationManagerProxy::Cancel(0), page->pageID());
62
#endif
63
}
64
65
} // namespace WebKit
- a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h +55 lines
Line 0 a/Source/WebKit2/WebProcess/Notifications/WebNotificationManager.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebNotificationManager_h
27
#define WebNotificationManager_h
28
29
#include <wtf/Noncopyable.h>
30
31
namespace WebCore {
32
class Notification;    
33
} // namespace WebCore
34
35
namespace WebKit {
36
37
class WebPage;
38
class WebProcess;
39
40
class WebNotificationManager {
41
    WTF_MAKE_NONCOPYABLE(WebNotificationManager);
42
public:
43
    explicit WebNotificationManager(WebProcess*);
44
    ~WebNotificationManager();
45
46
    bool show(WebCore::Notification*, WebPage*);
47
    void cancel(WebCore::Notification*, WebPage*);
48
49
private:
50
    WebProcess* m_process;
51
};
52
53
} // namespace WebKit
54
55
#endif
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp -7 lines
Lines 693-705 void WebChromeClient::scheduleCompositingLayerSync() a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp_sec1
693
693
694
#endif
694
#endif
695
695
696
#if ENABLE(NOTIFICATIONS)
697
WebCore::NotificationPresenter* WebChromeClient::notificationPresenter() const
698
{
699
    return 0;
700
}
701
#endif
702
703
#if ENABLE(TOUCH_EVENTS)
696
#if ENABLE(TOUCH_EVENTS)
704
void WebChromeClient::needTouchEvents(bool needTouchEvents)
697
void WebChromeClient::needTouchEvents(bool needTouchEvents)
705
{
698
{
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h -4 lines
Lines 183-192 private: a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h_sec1
183
    virtual void scheduleCompositingLayerSync() OVERRIDE;
183
    virtual void scheduleCompositingLayerSync() OVERRIDE;
184
#endif
184
#endif
185
185
186
#if ENABLE(NOTIFICATIONS)
187
    virtual WebCore::NotificationPresenter* notificationPresenter() const OVERRIDE;
188
#endif
189
190
#if ENABLE(TOUCH_EVENTS)
186
#if ENABLE(TOUCH_EVENTS)
191
    virtual void needTouchEvents(bool) OVERRIDE;
187
    virtual void needTouchEvents(bool) OVERRIDE;
192
#endif
188
#endif
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp +90 lines
Line 0 a/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.cpp_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#include "config.h"
27
#include "WebNotificationClient.h"
28
29
#if ENABLE(NOTIFICATIONS)
30
31
#include "WebNotificationManager.h"
32
#include "WebProcess.h"
33
#include <WebCore/NotImplemented.h>
34
35
using namespace WebCore;
36
37
namespace WebKit {
38
39
WebNotificationClient::WebNotificationClient(WebPage* page)
40
    : m_page(page)
41
{
42
}
43
44
WebNotificationClient::~WebNotificationClient()
45
{
46
}
47
48
bool WebNotificationClient::show(Notification* notification)
49
{
50
#if ENABLE(NOTIFICATIONS)
51
    return WebProcess::shared().notificationManager().show(notification, m_page);
52
#else
53
    notImplemented();
54
    return false;
55
#endif
56
}
57
58
void WebNotificationClient::cancel(Notification* notification)
59
{
60
#if ENABLE(NOTIFICATIONS)
61
    WebProcess::shared().notificationManager().cancel(notification, m_page);
62
#else
63
    notImplemented();
64
#endif
65
}
66
67
void WebNotificationClient::notificationObjectDestroyed(Notification*)
68
{
69
    notImplemented();
70
}
71
72
void WebNotificationClient::requestPermission(ScriptExecutionContext*, PassRefPtr<VoidCallback>)
73
{
74
    notImplemented();
75
}
76
77
void WebNotificationClient::cancelRequestsForPermission(ScriptExecutionContext*)
78
{
79
    notImplemented();
80
}
81
82
NotificationPresenter::Permission WebNotificationClient::checkPermission(ScriptExecutionContext*)
83
{
84
    notImplemented();
85
    return NotificationPresenter::PermissionDenied;
86
}
87
88
} // namespace WebKit
89
90
#endif // ENABLE(NOTIFICATIONS)
- a/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h +62 lines
Line 0 a/Source/WebKit2/WebProcess/WebCoreSupport/WebNotificationClient.h_sec1
1
/*
2
 * Copyright (C) 2011 Apple Inc. All rights reserved.
3
 *
4
 * Redistribution and use in source and binary forms, with or without
5
 * modification, are permitted provided that the following conditions
6
 * are met:
7
 * 1. Redistributions of source code must retain the above copyright
8
 *    notice, this list of conditions and the following disclaimer.
9
 * 2. Redistributions in binary form must reproduce the above copyright
10
 *    notice, this list of conditions and the following disclaimer in the
11
 *    documentation and/or other materials provided with the distribution.
12
 *
13
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
14
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23
 * THE POSSIBILITY OF SUCH DAMAGE.
24
 */
25
26
#ifndef WebNotificationClient_h
27
#define WebNotificationClient_h
28
29
#if ENABLE(NOTIFICATIONS)
30
31
#include <WebCore/NotificationPresenter.h>
32
33
namespace WebCore {
34
class ScriptExecutionContext;
35
class VoidCallback;
36
} // namespace WebCore
37
38
namespace WebKit {
39
40
class WebPage;
41
42
class WebNotificationClient : public WebCore::NotificationPresenter {
43
public:
44
    WebNotificationClient(WebPage*);
45
    virtual ~WebNotificationClient();
46
47
private:
48
    virtual bool show(WebCore::Notification*) OVERRIDE;
49
    virtual void cancel(WebCore::Notification*) OVERRIDE;
50
    virtual void notificationObjectDestroyed(WebCore::Notification*) OVERRIDE;
51
    virtual void requestPermission(WebCore::ScriptExecutionContext*, PassRefPtr<WebCore::VoidCallback>) OVERRIDE;
52
    virtual void cancelRequestsForPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
53
    virtual NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
54
    
55
    WebPage* m_page;
56
};
57
58
} // namespace WebKit
59
60
#endif // ENABLE(NOTIFICATIONS)
61
62
#endif // WebNotificationClient_h
- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp +5 lines
Lines 61-66 a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec1
61
#include "WebImage.h"
61
#include "WebImage.h"
62
#include "WebInspector.h"
62
#include "WebInspector.h"
63
#include "WebInspectorClient.h"
63
#include "WebInspectorClient.h"
64
#include "WebNotificationClient.h"
64
#include "WebOpenPanelResultListener.h"
65
#include "WebOpenPanelResultListener.h"
65
#include "WebPageCreationParameters.h"
66
#include "WebPageCreationParameters.h"
66
#include "WebPageGroupProxy.h"
67
#include "WebPageGroupProxy.h"
Lines 216-221 WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters) a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp_sec2
216
#if ENABLE(INSPECTOR)
217
#if ENABLE(INSPECTOR)
217
    pageClients.inspectorClient = new WebInspectorClient(this);
218
    pageClients.inspectorClient = new WebInspectorClient(this);
218
#endif
219
#endif
220
#if ENABLE(NOTIFICATIONS)
221
    pageClients.notificationClient = new WebNotificationClient(this);
222
#endif
223
    
219
    m_page = adoptPtr(new Page(pageClients));
224
    m_page = adoptPtr(new Page(pageClients));
220
225
221
    // Qt does not yet call setIsInWindow. Until it does, just leave
226
    // Qt does not yet call setIsInWindow. Until it does, just leave
- a/Source/WebKit2/WebProcess/WebPage/WebPage.h +1 lines
Lines 114-119 class WebImage; a/Source/WebKit2/WebProcess/WebPage/WebPage.h_sec1
114
class WebInspector;
114
class WebInspector;
115
class WebKeyboardEvent;
115
class WebKeyboardEvent;
116
class WebMouseEvent;
116
class WebMouseEvent;
117
class WebNotificationClient;
117
class WebOpenPanelResultListener;
118
class WebOpenPanelResultListener;
118
class WebPageGroupProxy;
119
class WebPageGroupProxy;
119
class WebPopupMenu;
120
class WebPopupMenu;
- a/Source/WebKit2/WebProcess/WebProcess.cpp +3 lines
Lines 140-145 WebProcess::WebProcess() a/Source/WebKit2/WebProcess/WebProcess.cpp_sec1
140
#endif
140
#endif
141
    , m_textCheckerState()
141
    , m_textCheckerState()
142
    , m_geolocationManager(this)
142
    , m_geolocationManager(this)
143
#if ENABLE(NOTIFICATIONS)
144
    , m_notificationManager(this)
145
#endif
143
    , m_iconDatabaseProxy(this)
146
    , m_iconDatabaseProxy(this)
144
#if ENABLE(PLUGIN_PROCESS)
147
#if ENABLE(PLUGIN_PROCESS)
145
    , m_disablePluginProcessMessageTimeout(false)
148
    , m_disablePluginProcessMessageTimeout(false)
- a/Source/WebKit2/WebProcess/WebProcess.h +11 lines
Lines 46-51 a/Source/WebKit2/WebProcess/WebProcess.h_sec1
46
class QNetworkAccessManager;
46
class QNetworkAccessManager;
47
#endif
47
#endif
48
48
49
#if ENABLE(NOTIFICATIONS)
50
#include "WebNotificationManager.h"
51
#endif
52
49
#if ENABLE(PLUGIN_PROCESS)
53
#if ENABLE(PLUGIN_PROCESS)
50
#include "PluginProcessConnectionManager.h"
54
#include "PluginProcessConnectionManager.h"
51
#endif
55
#endif
Lines 119-124 public: a/Source/WebKit2/WebProcess/WebProcess.h_sec2
119
123
120
    // Geolocation
124
    // Geolocation
121
    WebGeolocationManager& geolocationManager() { return m_geolocationManager; }
125
    WebGeolocationManager& geolocationManager() { return m_geolocationManager; }
126
    
127
#if ENABLE(NOTIFICATIONS)
128
    WebNotificationManager& notificationManager() { return m_notificationManager; }
129
#endif
122
130
123
    void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
131
    void clearResourceCaches(ResourceCachesToClear = AllResourceCaches);
124
    
132
    
Lines 241-246 private: a/Source/WebKit2/WebProcess/WebProcess.h_sec3
241
249
242
    TextCheckerState m_textCheckerState;
250
    TextCheckerState m_textCheckerState;
243
    WebGeolocationManager m_geolocationManager;
251
    WebGeolocationManager m_geolocationManager;
252
#if ENABLE(NOTIFICATIONS)
253
    WebNotificationManager m_notificationManager;
254
#endif
244
    WebIconDatabaseProxy m_iconDatabaseProxy;
255
    WebIconDatabaseProxy m_iconDatabaseProxy;
245
    
256
    
246
    String m_localStorageDirectory;
257
    String m_localStorageDirectory;
- a/Source/WebKit2/win/WebKit2.vcproj -14 / +90 lines
Lines 699-717 a/Source/WebKit2/win/WebKit2.vcproj_sec1
699
				>
699
				>
700
			</File>
700
			</File>
701
			<File
701
			<File
702
				RelativePath="..\Shared\WebImage.cpp"
702
				RelativePath="..\Shared\WebHitTestResult.cpp"
703
				>
703
				>
704
			</File>
704
			</File>
705
			<File
705
			<File
706
				RelativePath="..\Shared\WebImage.h"
706
				RelativePath="..\Shared\WebHitTestResult.h"
707
				>
707
				>
708
			</File>
708
			</File>
709
			<File
709
			<File
710
				RelativePath="..\Shared\WebHitTestResult.cpp"
710
				RelativePath="..\Shared\WebImage.cpp"
711
				>
711
				>
712
			</File>
712
			</File>
713
			<File
713
			<File
714
				RelativePath="..\Shared\WebHitTestResult.h"
714
				RelativePath="..\Shared\WebImage.h"
715
				>
715
				>
716
			</File>
716
			</File>
717
			<File
717
			<File
Lines 727-732 a/Source/WebKit2/win/WebKit2.vcproj_sec2
727
				>
727
				>
728
			</File>
728
			</File>
729
			<File
729
			<File
730
				RelativePath="..\Shared\WebNotification.cpp"
731
				>
732
			</File>
733
			<File
734
				RelativePath="..\Shared\WebNotification.h"
735
				>
736
			</File>
737
			<File
730
				RelativePath="..\Shared\WebNumber.h"
738
				RelativePath="..\Shared\WebNumber.h"
731
				>
739
				>
732
			</File>
740
			</File>
Lines 854-872 a/Source/WebKit2/win/WebKit2.vcproj_sec3
854
					>
862
					>
855
				</File>
863
				</File>
856
				<File
864
				<File
857
					RelativePath="..\Shared\API\c\WKConnectionRef.cpp"
865
					RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.cpp"
858
					>
866
					>
859
				</File>
867
				</File>
860
				<File
868
				<File
861
					RelativePath="..\Shared\API\c\WKConnectionRef.h"
869
					RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.h"
862
					>
870
					>
863
				</File>
871
				</File>
864
				<File
872
				<File
865
					RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.cpp"
873
					RelativePath="..\Shared\API\c\WKConnectionRef.cpp"
866
					>
874
					>
867
				</File>
875
				</File>
868
				<File
876
				<File
869
					RelativePath="..\Shared\API\c\win\WKCertificateInfoWin.h"
877
					RelativePath="..\Shared\API\c\WKConnectionRef.h"
870
					>
878
					>
871
				</File>
879
				</File>
872
				<File
880
				<File
Lines 914-924 a/Source/WebKit2/win/WebKit2.vcproj_sec4
914
					>
922
					>
915
				</File>
923
				</File>
916
				<File
924
				<File
917
					RelativePath="..\Shared\API\c\WKGeometry.h"
925
					RelativePath="..\Shared\API\c\WKGeometry.cpp"
918
					>
926
					>
919
				</File>
927
				</File>
920
				<File
928
				<File
921
					RelativePath="..\Shared\API\c\WKGeometry.cpp"
929
					RelativePath="..\Shared\API\c\WKGeometry.h"
922
					>
930
					>
923
				</File>
931
				</File>
924
				<File
932
				<File
Lines 1862-1867 a/Source/WebKit2/win/WebKit2.vcproj_sec5
1862
					>
1870
					>
1863
				</File>
1871
				</File>
1864
				<File
1872
				<File
1873
					RelativePath="..\WebProcess\WebCoreSupport\WebNotificationClient.cpp"
1874
					>
1875
				</File>
1876
				<File
1877
					RelativePath="..\WebProcess\WebCoreSupport\WebNotificationClient.h"
1878
					>
1879
				</File>
1880
				<File
1865
					RelativePath="..\WebProcess\WebCoreSupport\WebPlatformStrategies.cpp"
1881
					RelativePath="..\WebProcess\WebCoreSupport\WebPlatformStrategies.cpp"
1866
					>
1882
					>
1867
				</File>
1883
				</File>
Lines 2682-2687 a/Source/WebKit2/win/WebKit2.vcproj_sec6
2682
					</File>
2698
					</File>
2683
				</Filter>
2699
				</Filter>
2684
			</Filter>
2700
			</Filter>
2701
			<Filter
2702
				Name="Notifications (User)"
2703
				>
2704
				<File
2705
					RelativePath="..\WebProcess\Notifications\WebNotificationManager.cpp"
2706
					>
2707
				</File>
2708
				<File
2709
					RelativePath="..\WebProcess\Notifications\WebNotificationManager.h"
2710
					>
2711
				</File>
2712
			</Filter>
2685
		</Filter>
2713
		</Filter>
2686
		<Filter
2714
		<Filter
2687
			Name="UIProcess"
2715
			Name="UIProcess"
Lines 3039-3044 a/Source/WebKit2/win/WebKit2.vcproj_sec7
3039
				>
3067
				>
3040
			</File>
3068
			</File>
3041
			<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
3042
				RelativePath="..\UIProcess\WebOpenPanelResultListenerProxy.cpp"
3090
				RelativePath="..\UIProcess\WebOpenPanelResultListenerProxy.cpp"
3043
				>
3091
				>
3044
			</File>
3092
			</File>
Lines 3305-3323 a/Source/WebKit2/win/WebKit2.vcproj_sec8
3305
						>
3353
						>
3306
					</File>
3354
					</File>
3307
					<File
3355
					<File
3308
						RelativePath="..\UIProcess\API\C\WKHitTestResult.cpp"
3356
						RelativePath="..\UIProcess\API\C\WKGrammarDetail.cpp"
3309
						>
3357
						>
3310
					</File>
3358
					</File>
3311
					<File
3359
					<File
3312
						RelativePath="..\UIProcess\API\C\WKHitTestResult.h"
3360
						RelativePath="..\UIProcess\API\C\WKGrammarDetail.h"
3313
						>
3361
						>
3314
					</File>
3362
					</File>
3315
					<File
3363
					<File
3316
						RelativePath="..\UIProcess\API\C\WKGrammarDetail.cpp"
3364
						RelativePath="..\UIProcess\API\C\WKHitTestResult.cpp"
3317
						>
3365
						>
3318
					</File>
3366
					</File>
3319
					<File
3367
					<File
3320
						RelativePath="..\UIProcess\API\C\WKGrammarDetail.h"
3368
						RelativePath="..\UIProcess\API\C\WKHitTestResult.h"
3321
						>
3369
						>
3322
					</File>
3370
					</File>
3323
					<File
3371
					<File
Lines 3365-3370 a/Source/WebKit2/win/WebKit2.vcproj_sec9
3365
						>
3413
						>
3366
					</File>
3414
					</File>
3367
					<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"
3433
						>
3434
					</File>
3435
					<File
3368
						RelativePath="..\UIProcess\API\C\WKOpenPanelParameters.cpp"
3436
						RelativePath="..\UIProcess\API\C\WKOpenPanelParameters.cpp"
3369
						>
3437
						>
3370
					</File>
3438
					</File>
Lines 4211-4216 a/Source/WebKit2/win/WebKit2.vcproj_sec10
4211
				>
4279
				>
4212
			</File>
4280
			</File>
4213
			<File
4281
			<File
4282
				RelativePath="..\..\..\..\WebKitBuild\Debug\obj\WebKit\DerivedSources\WebNotificationManagerProxyMessageReceiver.cpp"
4283
				>
4284
			</File>
4285
			<File
4286
				RelativePath="..\..\..\..\WebKitBuild\Debug\obj\WebKit\DerivedSources\WebNotificationManagerProxyMessages.h"
4287
				>
4288
			</File>
4289
			<File
4214
				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
4290
				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\WebPageMessageReceiver.cpp"
4215
				>
4291
				>
4216
			</File>
4292
			</File>

Return to Bug 73253