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

Side by Side Diff: content/worker/webworker_stub.cc

Issue 7477027: Support Transferable objects (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebase. Created 9 years, 4 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/webworker_proxy.cc ('k') | content/worker/webworkerclient_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/webworker_stub.h" 5 #include "content/worker/webworker_stub.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "content/common/child_thread.h" 8 #include "content/common/child_thread.h"
9 #include "content/common/content_client.h" 9 #include "content/common/content_client.h"
10 #include "content/common/file_system/file_system_dispatcher.h" 10 #include "content/common/file_system/file_system_dispatcher.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 impl_->terminateWorkerContext(); 64 impl_->terminateWorkerContext();
65 65
66 // Call the client to make sure context exits. 66 // Call the client to make sure context exits.
67 EnsureWorkerContextTerminates(); 67 EnsureWorkerContextTerminates();
68 } 68 }
69 69
70 void WebWorkerStub::OnPostMessage( 70 void WebWorkerStub::OnPostMessage(
71 const string16& message, 71 const string16& message,
72 const std::vector<int>& sent_message_port_ids, 72 const std::vector<int>& sent_message_port_ids,
73 const std::vector<int>& new_routing_ids) { 73 const std::vector<int>& new_routing_ids) {
74 WebKit::WebMessagePortChannelArray channels(sent_message_port_ids.size()); 74 WebKit::WebTransferableReceiptArray receipts(sent_message_port_ids.size());
75 for (size_t i = 0; i < sent_message_port_ids.size(); i++) { 75 for (size_t i = 0; i < sent_message_port_ids.size(); i++) {
76 channels[i] = new WebMessagePortChannelImpl( 76 receipts[i] = new WebMessagePortChannelImpl(
77 new_routing_ids[i], sent_message_port_ids[i]); 77 new_routing_ids[i], sent_message_port_ids[i]);
78 } 78 }
79 79
80 impl_->postMessageToWorkerContext(message, channels); 80 impl_->postMessageToWorkerContext(message, receipts);
81 } 81 }
OLDNEW
« no previous file with comments | « content/renderer/webworker_proxy.cc ('k') | content/worker/webworkerclient_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698