Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: Source/web/ServiceWorkerGlobalScopeProxy.h

Issue 720873002: Expose the notificationclick and notificationerror events on ServiceWorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments and test Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 class ServiceWorkerGlobalScopeProxy final 62 class ServiceWorkerGlobalScopeProxy final
63 : public WebServiceWorkerContextProxy 63 : public WebServiceWorkerContextProxy
64 , public WorkerReportingProxy { 64 , public WorkerReportingProxy {
65 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy); 65 WTF_MAKE_NONCOPYABLE(ServiceWorkerGlobalScopeProxy);
66 public: 66 public:
67 static PassOwnPtr<ServiceWorkerGlobalScopeProxy> create(WebEmbeddedWorkerImp l&, Document&, WebServiceWorkerContextClient&); 67 static PassOwnPtr<ServiceWorkerGlobalScopeProxy> create(WebEmbeddedWorkerImp l&, Document&, WebServiceWorkerContextClient&);
68 virtual ~ServiceWorkerGlobalScopeProxy(); 68 virtual ~ServiceWorkerGlobalScopeProxy();
69 69
70 // WebServiceWorkerContextProxy overrides: 70 // WebServiceWorkerContextProxy overrides:
71 virtual void dispatchActivateEvent(int) override; 71 virtual void dispatchActivateEvent(int) override;
72 virtual void dispatchInstallEvent(int) override;
73 virtual void dispatchFetchEvent(int, const WebServiceWorkerRequest&) overrid e; 72 virtual void dispatchFetchEvent(int, const WebServiceWorkerRequest&) overrid e;
74 virtual void dispatchGeofencingEvent(int, WebGeofencingEventType, const WebS tring& regionID, const WebCircularGeofencingRegion&) override; 73 virtual void dispatchGeofencingEvent(int, WebGeofencingEventType, const WebS tring& regionID, const WebCircularGeofencingRegion&) override;
74 virtual void dispatchInstallEvent(int) override;
75 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray&) override; 75 virtual void dispatchMessageEvent(const WebString& message, const WebMessage PortChannelArray&) override;
76 virtual void dispatchNotificationClickEvent(int eventID, const WebNotificati onData&) override;
77 virtual void dispatchNotificationErrorEvent(int eventID, const WebNotificati onData&) override;
76 virtual void dispatchPushEvent(int, const WebString& data) override; 78 virtual void dispatchPushEvent(int, const WebString& data) override;
77 virtual void dispatchSyncEvent(int) override; 79 virtual void dispatchSyncEvent(int) override;
78 80
79 // WorkerReportingProxy overrides: 81 // WorkerReportingProxy overrides:
80 virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) override; 82 virtual void reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL) override;
81 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov erride; 83 virtual void reportConsoleMessage(PassRefPtrWillBeRawPtr<ConsoleMessage>) ov erride;
82 virtual void postMessageToPageInspector(const String&) override; 84 virtual void postMessageToPageInspector(const String&) override;
83 virtual void didEvaluateWorkerScript(bool success) override; 85 virtual void didEvaluateWorkerScript(bool success) override;
84 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override; 86 virtual void workerGlobalScopeStarted(WorkerGlobalScope*) override;
85 virtual void workerGlobalScopeClosed() override; 87 virtual void workerGlobalScopeClosed() override;
86 virtual void willDestroyWorkerGlobalScope() override; 88 virtual void willDestroyWorkerGlobalScope() override;
87 virtual void workerThreadTerminated() override; 89 virtual void workerThreadTerminated() override;
88 90
89 private: 91 private:
90 ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl&, Document&, WebServiceW orkerContextClient&); 92 ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerImpl&, Document&, WebServiceW orkerContextClient&);
91 93
92 WebEmbeddedWorkerImpl& m_embeddedWorker; 94 WebEmbeddedWorkerImpl& m_embeddedWorker;
93 Document& m_document; 95 Document& m_document;
94 96
95 WebServiceWorkerContextClient& m_client; 97 WebServiceWorkerContextClient& m_client;
96 98
97 ServiceWorkerGlobalScope* m_workerGlobalScope; 99 ServiceWorkerGlobalScope* m_workerGlobalScope;
98 }; 100 };
99 101
100 } // namespace blink 102 } // namespace blink
101 103
102 #endif // ServiceWorkerGlobalScopeProxy_h 104 #endif // ServiceWorkerGlobalScopeProxy_h
OLDNEW
« no previous file with comments | « Source/web/ServiceWorkerGlobalScopeClientImpl.cpp ('k') | Source/web/ServiceWorkerGlobalScopeProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698