OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/worker/websharedworker_stub.h" | 5 #include "chrome/worker/websharedworker_stub.h" |
6 | 6 |
7 #include "chrome/common/webmessageportchannel_impl.h" | 7 #include "chrome/common/webmessageportchannel_impl.h" |
8 #include "chrome/common/worker_messages.h" | 8 #include "chrome/common/worker_messages.h" |
9 #include "webkit/api/public/WebSharedWorker.h" | 9 #include "third_party/WebKit/WebKit/chromium/public/WebSharedWorker.h" |
10 #include "webkit/api/public/WebString.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebString.h" |
11 #include "webkit/api/public/WebURL.h" | 11 #include "third_party/WebKit/WebKit/chromium/public/WebURL.h" |
12 | 12 |
13 WebSharedWorkerStub::WebSharedWorkerStub( | 13 WebSharedWorkerStub::WebSharedWorkerStub( |
14 const string16& name, int route_id) | 14 const string16& name, int route_id) |
15 : WebWorkerStubBase(route_id), | 15 : WebWorkerStubBase(route_id), |
16 name_(name) { | 16 name_(name) { |
17 | 17 |
18 // TODO(atwilson): Add support for NaCl when they support MessagePorts. | 18 // TODO(atwilson): Add support for NaCl when they support MessagePorts. |
19 impl_ = WebKit::WebSharedWorker::create(client()); | 19 impl_ = WebKit::WebSharedWorker::create(client()); |
20 | 20 |
21 } | 21 } |
(...skipping 21 matching lines...) Expand all Loading... |
43 new WebMessagePortChannelImpl(routing_id, sent_message_port_id); | 43 new WebMessagePortChannelImpl(routing_id, sent_message_port_id); |
44 impl_->connect(channel, NULL); | 44 impl_->connect(channel, NULL); |
45 } | 45 } |
46 | 46 |
47 void WebSharedWorkerStub::OnTerminateWorkerContext() { | 47 void WebSharedWorkerStub::OnTerminateWorkerContext() { |
48 impl_->terminateWorkerContext(); | 48 impl_->terminateWorkerContext(); |
49 | 49 |
50 // Call the client to make sure context exits. | 50 // Call the client to make sure context exits. |
51 EnsureWorkerContextTerminates(); | 51 EnsureWorkerContextTerminates(); |
52 } | 52 } |
OLD | NEW |