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

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

Issue 988063004: Use UUID for ServiceWorker Client identifier (2/3, chromium) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 years, 9 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 virtual void didHandleSyncEvent(int request_id); 108 virtual void didHandleSyncEvent(int request_id);
109 virtual void didHandleCrossOriginConnectEvent(int request_id, 109 virtual void didHandleCrossOriginConnectEvent(int request_id,
110 bool accept_connection); 110 bool accept_connection);
111 111
112 // Called on the main thread. 112 // Called on the main thread.
113 virtual blink::WebServiceWorkerNetworkProvider* 113 virtual blink::WebServiceWorkerNetworkProvider*
114 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); 114 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source);
115 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider(); 115 virtual blink::WebServiceWorkerProvider* createServiceWorkerProvider();
116 116
117 virtual void postMessageToClient( 117 virtual void postMessageToClient(
118 int client_id, 118 const blink::WebString& uuid,
119 const blink::WebString& message, 119 const blink::WebString& message,
120 blink::WebMessagePortChannelArray* channels); 120 blink::WebMessagePortChannelArray* channels);
121 virtual void postMessageToCrossOriginClient( 121 virtual void postMessageToCrossOriginClient(
122 const blink::WebCrossOriginServiceWorkerClient& client, 122 const blink::WebCrossOriginServiceWorkerClient& client,
123 const blink::WebString& message, 123 const blink::WebString& message,
124 blink::WebMessagePortChannelArray* channels); 124 blink::WebMessagePortChannelArray* channels);
125 virtual void focus(int client_id, 125 virtual void focus(const blink::WebString& uuid,
126 blink::WebServiceWorkerClientCallbacks*); 126 blink::WebServiceWorkerClientCallbacks*);
127 virtual void skipWaiting( 127 virtual void skipWaiting(
128 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); 128 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks);
129 virtual void claim(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); 129 virtual void claim(blink::WebServiceWorkerClientsClaimCallbacks* callbacks);
130 130
131 // TODO: Implement DevTools related method overrides. 131 // TODO: Implement DevTools related method overrides.
132 132
133 int embedded_worker_id() const { return embedded_worker_id_; } 133 int embedded_worker_id() const { return embedded_worker_id_; }
134 base::SingleThreadTaskRunner* main_thread_task_runner() const { 134 base::SingleThreadTaskRunner* main_thread_task_runner() const {
135 return main_thread_task_runner_.get(); 135 return main_thread_task_runner_.get();
(...skipping 20 matching lines...) Expand all
156 scoped_refptr<ServiceWorkerProviderContext> provider_context_; 156 scoped_refptr<ServiceWorkerProviderContext> provider_context_;
157 157
158 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; 158 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_;
159 159
160 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); 160 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient);
161 }; 161 };
162 162
163 } // namespace content 163 } // namespace content
164 164
165 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 165 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698