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

Side by Side Diff: content/renderer/shared_worker/embedded_shared_worker_stub.cc

Issue 318013002: Implement EmbeddedSharedWorkerPermissionClientProxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h" 5 #include "content/renderer/shared_worker/embedded_shared_worker_stub.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "content/child/appcache/appcache_dispatcher.h" 8 #include "content/child/appcache/appcache_dispatcher.h"
9 #include "content/child/appcache/web_application_cache_host_impl.h" 9 #include "content/child/appcache/web_application_cache_host_impl.h"
10 #include "content/child/scoped_child_process_reference.h" 10 #include "content/child/scoped_child_process_reference.h"
11 #include "content/child/shared_worker_devtools_agent.h" 11 #include "content/child/shared_worker_devtools_agent.h"
12 #include "content/child/webmessageportchannel_impl.h" 12 #include "content/child/webmessageportchannel_impl.h"
13 #include "content/common/worker_messages.h" 13 #include "content/common/worker_messages.h"
14 #include "content/renderer/render_thread_impl.h" 14 #include "content/renderer/render_thread_impl.h"
15 #include "content/renderer/shared_worker/embedded_shared_worker_permission_clien t_proxy.h"
15 #include "ipc/ipc_message_macros.h" 16 #include "ipc/ipc_message_macros.h"
17 #include "third_party/WebKit/public/web/WebSecurityOrigin.h"
16 #include "third_party/WebKit/public/web/WebSharedWorker.h" 18 #include "third_party/WebKit/public/web/WebSharedWorker.h"
17 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h" 19 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h"
18 20
19 namespace content { 21 namespace content {
20 22
21 namespace { 23 namespace {
22 24
23 class SharedWorkerWebApplicationCacheHostImpl 25 class SharedWorkerWebApplicationCacheHostImpl
24 : public WebApplicationCacheHostImpl { 26 : public WebApplicationCacheHostImpl {
25 public: 27 public:
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 blink::WebApplicationCacheHost* 148 blink::WebApplicationCacheHost*
147 EmbeddedSharedWorkerStub::createApplicationCacheHost( 149 EmbeddedSharedWorkerStub::createApplicationCacheHost(
148 blink::WebApplicationCacheHostClient* client) { 150 blink::WebApplicationCacheHostClient* client) {
149 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client); 151 app_cache_host_ = new SharedWorkerWebApplicationCacheHostImpl(client);
150 return app_cache_host_; 152 return app_cache_host_;
151 } 153 }
152 154
153 blink::WebWorkerPermissionClientProxy* 155 blink::WebWorkerPermissionClientProxy*
154 EmbeddedSharedWorkerStub::createWorkerPermissionClientProxy( 156 EmbeddedSharedWorkerStub::createWorkerPermissionClientProxy(
155 const blink::WebSecurityOrigin& origin) { 157 const blink::WebSecurityOrigin& origin) {
156 // TODO(horo): implement this. 158 return new EmbeddedSharedWorkerPermissionClientProxy(
157 return NULL; 159 GURL(origin.toString()),
160 origin.isUnique(),
161 route_id_,
162 ChildThread::current()->thread_safe_sender());
158 } 163 }
159 164
160 void EmbeddedSharedWorkerStub::dispatchDevToolsMessage( 165 void EmbeddedSharedWorkerStub::dispatchDevToolsMessage(
161 const blink::WebString& message) { 166 const blink::WebString& message) {
162 worker_devtools_agent_->SendDevToolsMessage(message); 167 worker_devtools_agent_->SendDevToolsMessage(message);
163 } 168 }
164 169
165 void EmbeddedSharedWorkerStub::saveDevToolsAgentState( 170 void EmbeddedSharedWorkerStub::saveDevToolsAgentState(
166 const blink::WebString& state) { 171 const blink::WebString& state) {
167 worker_devtools_agent_->SaveDevToolsAgentState(state); 172 worker_devtools_agent_->SaveDevToolsAgentState(state);
(...skipping 30 matching lines...) Expand all
198 pending_channels_.push_back(channel); 203 pending_channels_.push_back(channel);
199 } 204 }
200 } 205 }
201 206
202 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() { 207 void EmbeddedSharedWorkerStub::OnTerminateWorkerContext() {
203 runing_ = false; 208 runing_ = false;
204 impl_->terminateWorkerContext(); 209 impl_->terminateWorkerContext();
205 } 210 }
206 211
207 } // namespace content 212 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/shared_worker/embedded_shared_worker_permission_client_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698