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

Side by Side Diff: chrome/worker/websharedworker_stub.cc

Issue 372047: Fixed worker startup issue (Closed)
Patch Set: Removed tests to a separate patch. Created 11 years, 1 month 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 (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 "webkit/api/public/WebSharedWorker.h"
10 #include "webkit/api/public/WebString.h" 10 #include "webkit/api/public/WebString.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 void WebSharedWorkerStub::OnStartWorkerContext( 36 void WebSharedWorkerStub::OnStartWorkerContext(
37 const GURL& url, const string16& user_agent, const string16& source_code) { 37 const GURL& url, const string16& user_agent, const string16& source_code) {
38 impl_->startWorkerContext(url, name_, user_agent, source_code); 38 impl_->startWorkerContext(url, name_, user_agent, source_code);
39 } 39 }
40 40
41 void WebSharedWorkerStub::OnConnect(int sent_message_port_id, int routing_id) { 41 void WebSharedWorkerStub::OnConnect(int sent_message_port_id, int routing_id) {
42 WebKit::WebMessagePortChannel* channel = 42 WebKit::WebMessagePortChannel* channel =
43 new WebMessagePortChannelImpl(routing_id, sent_message_port_id); 43 new WebMessagePortChannelImpl(routing_id, sent_message_port_id);
44 impl_->connect(channel); 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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698