| OLD | NEW |
| 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" | |
| 14 #include "third_party/WebKit/public/platform/WebServiceWorkerClientsInfo.h" | |
| 15 #include "third_party/WebKit/public/platform/WebServiceWorkerEventResult.h" | |
| 16 #include "third_party/WebKit/public/platform/WebServiceWorkerSkipWaitingCallback
s.h" | |
| 17 #include "third_party/WebKit/public/platform/WebURL.h" | |
| 18 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" | 13 #include "third_party/WebKit/public/web/WebServiceWorkerContextClient.h" |
| 19 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 20 | 15 |
| 21 namespace base { | 16 namespace base { |
| 22 class MessageLoopProxy; | 17 class MessageLoopProxy; |
| 23 class TaskRunner; | 18 class TaskRunner; |
| 24 } | 19 } |
| 25 | 20 |
| 26 namespace blink { | 21 namespace blink { |
| 27 class WebDataSource; | 22 class WebDataSource; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 const blink::WebString& message, | 105 const blink::WebString& message, |
| 111 blink::WebMessagePortChannelArray* channels); | 106 blink::WebMessagePortChannelArray* channels); |
| 112 virtual void postMessageToCrossOriginClient( | 107 virtual void postMessageToCrossOriginClient( |
| 113 const blink::WebCrossOriginServiceWorkerClient& client, | 108 const blink::WebCrossOriginServiceWorkerClient& client, |
| 114 const blink::WebString& message, | 109 const blink::WebString& message, |
| 115 blink::WebMessagePortChannelArray* channels); | 110 blink::WebMessagePortChannelArray* channels); |
| 116 virtual void focus(int client_id, | 111 virtual void focus(int client_id, |
| 117 blink::WebServiceWorkerClientFocusCallback*); | 112 blink::WebServiceWorkerClientFocusCallback*); |
| 118 virtual void skipWaiting( | 113 virtual void skipWaiting( |
| 119 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); | 114 blink::WebServiceWorkerSkipWaitingCallbacks* callbacks); |
| 115 virtual void claim(blink::WebServiceWorkerClientsClaimCallbacks* callbacks); |
| 120 | 116 |
| 121 // TODO: Implement DevTools related method overrides. | 117 // TODO: Implement DevTools related method overrides. |
| 122 | 118 |
| 123 int embedded_worker_id() const { return embedded_worker_id_; } | 119 int embedded_worker_id() const { return embedded_worker_id_; } |
| 124 base::MessageLoopProxy* main_thread_proxy() const { | 120 base::MessageLoopProxy* main_thread_proxy() const { |
| 125 return main_thread_proxy_.get(); | 121 return main_thread_proxy_.get(); |
| 126 } | 122 } |
| 127 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } | 123 ThreadSafeSender* thread_safe_sender() { return sender_.get(); } |
| 128 | 124 |
| 129 private: | 125 private: |
| (...skipping 16 matching lines...) Expand all Loading... |
| 146 scoped_refptr<ServiceWorkerProviderContext> provider_context_; | 142 scoped_refptr<ServiceWorkerProviderContext> provider_context_; |
| 147 | 143 |
| 148 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; | 144 base::WeakPtrFactory<EmbeddedWorkerContextClient> weak_factory_; |
| 149 | 145 |
| 150 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); | 146 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerContextClient); |
| 151 }; | 147 }; |
| 152 | 148 |
| 153 } // namespace content | 149 } // namespace content |
| 154 | 150 |
| 155 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ | 151 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_CONTEXT_CLIENT_H_ |
| OLD | NEW |