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

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: rebase again 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/WebServiceWorkerClientFocusCallback .h" 13 #include "third_party/WebKit/public/platform/WebServiceWorkerClientFocusCallback .h"
14 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" 14 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h"
15 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" 15 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h"
16 #include "third_party/WebKit/public/platform/WebServiceWorkerSkipWaitingCallback s.h"
16 #include "third_party/WebKit/public/platform/WebURL.h" 17 #include "third_party/WebKit/public/platform/WebURL.h"
17 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" 18 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h"
18 #include "url/gurl.h" 19 #include "url/gurl.h"
19 20
20 namespace base { 21 namespace base {
21 class MessageLoopProxy; 22 class MessageLoopProxy;
22 class TaskRunner; 23 class TaskRunner;
23 } 24 }
24 25
25 namespace blink { 26 namespace blink {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 blink::WebServiceWorkerEventResult result); 100 blink::WebServiceWorkerEventResult result);
100 virtual void didHandleSyncEvent(int request_id); 101 virtual void didHandleSyncEvent(int request_id);
101 virtual blink::WebServiceWorkerNetworkProvider* 102 virtual blink::WebServiceWorkerNetworkProvider*
102 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source); 103 createServiceWorkerNetworkProvider(blink::WebDataSource* data_source);
103 virtual void postMessageToClient( 104 virtual void postMessageToClient(
104 int client_id, 105 int client_id,
105 const blink::WebString& message, 106 const blink::WebString& message,
106 blink::WebMessagePortChannelArray* channels); 107 blink::WebMessagePortChannelArray* channels);
107 virtual void focus(int client_id, 108 virtual void focus(int client_id,
108 blink::WebServiceWorkerClientFocusCallback*); 109 blink::WebServiceWorkerClientFocusCallback*);
110 virtual void skipWaiting(
111 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks);
109 112
110 // TODO: Implement DevTools related method overrides. 113 // TODO: Implement DevTools related method overrides.
111 114
112 int embedded_worker_id() const { return embedded_worker_id_; } 115 int embedded_worker_id() const { return embedded_worker_id_; }
113 base::MessageLoopProxy* main_thread_proxy() const { 116 base::MessageLoopProxy* main_thread_proxy() const {
114 return main_thread_proxy_.get(); 117 return main_thread_proxy_.get();
115 } 118 }
116 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } 119 ThreadSafeSender* thread_safe_sender() { return sender_.get(); }
117 120
118 private: 121 private:
(...skipping 14 matching lines...) Expand all
133 scoped_ptr<ServiceWorkerScriptContext> script_context_; 136 scoped_ptr<ServiceWorkerScriptContext> script_context_;
134 137
135 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; 138 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_;
136 139
137 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); 140 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient);
138 }; 141 };
139 142
140 } // namespace content 143 } // namespace content
141 144
142 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ 145 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698