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

Side by Side Diff: content/renderer/service_worker/service_worker_script_context.h

Issue 861373002: Refactor navigator.connect code to make it more flexible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo Created 5 years, 10 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 namespace IPC { 33 namespace IPC {
34 class Message; 34 class Message;
35 } 35 }
36 36
37 namespace content { 37 namespace content {
38 38
39 class EmbeddedWorkerContextClient; 39 class EmbeddedWorkerContextClient;
40 class WebServiceWorkerRegistrationImpl; 40 class WebServiceWorkerRegistrationImpl;
41 struct CrossOriginServiceWorkerClient; 41 struct NavigatorConnectClient;
42 struct PlatformNotificationData; 42 struct PlatformNotificationData;
43 43
44 // TODO(kinuko): This should implement WebServiceWorkerContextClient 44 // TODO(kinuko): This should implement WebServiceWorkerContextClient
45 // rather than having EmbeddedWorkerContextClient implement it. 45 // rather than having EmbeddedWorkerContextClient implement it.
46 // See the header comment in embedded_worker_context_client.h for the 46 // See the header comment in embedded_worker_context_client.h for the
47 // potential EW/SW layering concerns. 47 // potential EW/SW layering concerns.
48 class ServiceWorkerScriptContext { 48 class ServiceWorkerScriptContext {
49 public: 49 public:
50 ServiceWorkerScriptContext( 50 ServiceWorkerScriptContext(
51 EmbeddedWorkerContextClient* embedded_context, 51 EmbeddedWorkerContextClient* embedded_context,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void OnNotificationClickEvent( 110 void OnNotificationClickEvent(
111 int request_id, 111 int request_id,
112 const std::string& notification_id, 112 const std::string& notification_id,
113 const PlatformNotificationData& notification_data); 113 const PlatformNotificationData& notification_data);
114 void OnPushEvent(int request_id, const std::string& data); 114 void OnPushEvent(int request_id, const std::string& data);
115 void OnGeofencingEvent(int request_id, 115 void OnGeofencingEvent(int request_id,
116 blink::WebGeofencingEventType event_type, 116 blink::WebGeofencingEventType event_type,
117 const std::string& region_id, 117 const std::string& region_id,
118 const blink::WebCircularGeofencingRegion& region); 118 const blink::WebCircularGeofencingRegion& region);
119 void OnCrossOriginConnectEvent(int request_id, 119 void OnCrossOriginConnectEvent(int request_id,
120 const CrossOriginServiceWorkerClient& client); 120 const NavigatorConnectClient& client);
121 void OnPostMessage(const base::string16& message, 121 void OnPostMessage(const base::string16& message,
122 const std::vector<int>& sent_message_port_ids, 122 const std::vector<int>& sent_message_port_ids,
123 const std::vector<int>& new_routing_ids); 123 const std::vector<int>& new_routing_ids);
124 void OnCrossOriginMessageToWorker( 124 void OnCrossOriginMessageToWorker(
125 const CrossOriginServiceWorkerClient& client, 125 const NavigatorConnectClient& client,
126 const base::string16& message, 126 const base::string16& message,
127 const std::vector<int>& sent_message_port_ids, 127 const std::vector<int>& sent_message_port_ids,
128 const std::vector<int>& new_routing_ids); 128 const std::vector<int>& new_routing_ids);
129 void OnDidGetClientDocuments( 129 void OnDidGetClientDocuments(
130 int request_id, const std::vector<ServiceWorkerClientInfo>& clients); 130 int request_id, const std::vector<ServiceWorkerClientInfo>& clients);
131 void OnFocusClientResponse(int request_id, bool result); 131 void OnFocusClientResponse(int request_id, bool result);
132 void OnDidSkipWaiting(int request_id); 132 void OnDidSkipWaiting(int request_id);
133 133
134 scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_; 134 scoped_ptr<ServiceWorkerCacheStorageDispatcher> cache_storage_dispatcher_;
135 135
(...skipping 23 matching lines...) Expand all
159 std::map<int, base::TimeTicks> install_start_timings_; 159 std::map<int, base::TimeTicks> install_start_timings_;
160 std::map<int, base::TimeTicks> notification_click_start_timings_; 160 std::map<int, base::TimeTicks> notification_click_start_timings_;
161 std::map<int, base::TimeTicks> push_start_timings_; 161 std::map<int, base::TimeTicks> push_start_timings_;
162 162
163 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext); 163 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerScriptContext);
164 }; 164 };
165 165
166 } // namespace content 166 } // namespace content
167 167
168 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_ 168 #endif // CONTENT_RENDERER_SERVICE_WORKER_SERVICE_WORKER_SCRIPT_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/public/common/navigator_connect_client.cc ('k') | content/renderer/service_worker/service_worker_script_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698