OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/worker/websharedworkerclient_proxy.h" | 5 #include "content/worker/websharedworkerclient_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "content/child/webmessageportchannel_impl.h" | 10 #include "content/child/webmessageportchannel_impl.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 client); | 74 client); |
75 // Remember the id of the instance we create so we have access to that | 75 // Remember the id of the instance we create so we have access to that |
76 // value when creating nested dedicated workers in createWorker. | 76 // value when creating nested dedicated workers in createWorker. |
77 appcache_host_id_ = host->host_id(); | 77 appcache_host_id_ = host->host_id(); |
78 return host; | 78 return host; |
79 } | 79 } |
80 | 80 |
81 WebKit::WebWorkerPermissionClientProxy* | 81 WebKit::WebWorkerPermissionClientProxy* |
82 WebSharedWorkerClientProxy::createWorkerPermissionClientProxy( | 82 WebSharedWorkerClientProxy::createWorkerPermissionClientProxy( |
83 const WebKit::WebSecurityOrigin& origin) { | 83 const WebKit::WebSecurityOrigin& origin) { |
84 if (origin.isUnique()) | |
85 return NULL; | |
michaeln
2013/11/01 18:22:46
right... no proxy means "allowed" by default which
| |
86 return new SharedWorkerPermissionClientProxy( | 84 return new SharedWorkerPermissionClientProxy( |
87 GURL(origin.toString()), route_id_, | 85 GURL(origin.toString()), origin.isUnique(), route_id_, |
88 ChildThread::current()->thread_safe_sender()); | 86 ChildThread::current()->thread_safe_sender()); |
89 } | 87 } |
90 | 88 |
91 // TODO(kinuko): Deprecate these methods. | 89 // TODO(kinuko): Deprecate these methods. |
92 bool WebSharedWorkerClientProxy::allowDatabase(WebFrame* frame, | 90 bool WebSharedWorkerClientProxy::allowDatabase(WebFrame* frame, |
93 const WebString& name, | 91 const WebString& name, |
94 const WebString& display_name, | 92 const WebString& display_name, |
95 unsigned long estimated_size) { | 93 unsigned long estimated_size) { |
96 return false; | 94 return false; |
97 } | 95 } |
(...skipping 28 matching lines...) Expand all Loading... | |
126 // page. It's ok to post several of theese, because the first executed task | 124 // page. It's ok to post several of theese, because the first executed task |
127 // will exit the message loop and subsequent ones won't be executed. | 125 // will exit the message loop and subsequent ones won't be executed. |
128 base::MessageLoop::current()->PostDelayedTask( | 126 base::MessageLoop::current()->PostDelayedTask( |
129 FROM_HERE, | 127 FROM_HERE, |
130 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed, | 128 base::Bind(&WebSharedWorkerClientProxy::workerContextDestroyed, |
131 weak_factory_.GetWeakPtr()), | 129 weak_factory_.GetWeakPtr()), |
132 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); | 130 base::TimeDelta::FromSeconds(kMaxTimeForRunawayWorkerSeconds)); |
133 } | 131 } |
134 | 132 |
135 } // namespace content | 133 } // namespace content |
OLD | NEW |