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

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

Issue 717353004: ServiceWorker: Add support for .skipWaiting and controllerchange event(2/3) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review update Created 6 years 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"
11 #include "content/common/service_worker/service_worker_types.h" 11 #include "content/common/service_worker/service_worker_types.h"
12 #include "ipc/ipc_listener.h" 12 #include "ipc/ipc_listener.h"
13 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" 13 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h"
14 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" 14 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
15 #include "third_party/WebKit/public/platform/WebServiceWorkerSkipWaitingCallback s.h"
15 #include "third_party/WebKit/public/platform/WebURL.h" 16 #include "third_party/WebKit/public/platform/WebURL.h"
16 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" 17 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h"
17 #include "url/gurl.h" 18 #include "url/gurl.h"
18 19
19 namespace base { 20 namespace base {
20 class MessageLoopProxy; 21 class MessageLoopProxy;
21 class TaskRunner; 22 class TaskRunner;
22 } 23 }
23 24
24 namespace blink { 25 namespace blink {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 const blink::WebServiceWorkerResponse& response); 94 const blink::WebServiceWorkerResponse& response);
94 virtual void didHandlePushEvent(int request_id, 95 virtual void didHandlePushEvent(int request_id,
95 blink::WebServiceWorkerEventResult result); 96 blink::WebServiceWorkerEventResult result);
96 virtual void didHandleSyncEvent(int request_id); 97 virtual void didHandleSyncEvent(int request_id);
97 virtual blink::WebServiceWorkerNetworkProvider* 98 virtual blink::WebServiceWorkerNetworkProvider*
98 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); 99 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source);
99 virtual void postMessageToClient( 100 virtual void postMessageToClient(
100 int client_id, 101 int client_id,
101 const blink::WebString& message, 102 const blink::WebString& message,
102 blink::WebMessagePortChannelArray* channels); 103 blink::WebMessagePortChannelArray* channels);
104 virtual void skipWaiting(
105 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks);
103 106
104 // TODO: Implement DevTools related method overrides. 107 // TODO: Implement DevTools related method overrides.
105 108
106 int embedded_worker_id() const { return embedded_worker_id_; } 109 int embedded_worker_id() const { return embedded_worker_id_; }
107 base::MessageLoopProxy* main_thread_proxy() const { 110 base::MessageLoopProxy* main_thread_proxy() const {
108 return main_thread_proxy_.get(); 111 return main_thread_proxy_.get();
109 } 112 }
110 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } 113 ThreadSafeSender* thread_safe_sender() { return sender_.get(); }
111 114
112 private: 115 private:
(...skipping 14 matching lines...) Expand all
127 scoped_ptr<ServiceWorkerScriptContext> script_context_; 130 scoped_ptr<ServiceWorkerScriptContext> script_context_;
128 131
129 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; 132 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_;
130 133
131 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); 134 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient);
132 }; 135 };
133 136
134 } // namespace content 137 } // namespace content
135 138
136 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 139 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698