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

Side by Side Diff: content/browser/shared_worker/shared_worker_host.cc

Issue 1159553007: Move Tuple to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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/browser/shared_worker/shared_worker_host.h" 5 #include "content/browser/shared_worker/shared_worker_host.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "content/browser/devtools/shared_worker_devtools_manager.h" 8 #include "content/browser/devtools/shared_worker_devtools_manager.h"
9 #include "content/browser/frame_host/render_frame_host_delegate.h" 9 #include "content/browser/frame_host/render_frame_host_delegate.h"
10 #include "content/browser/frame_host/render_frame_host_impl.h" 10 #include "content/browser/frame_host/render_frame_host_impl.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 void SharedWorkerHost::RelayMessage( 260 void SharedWorkerHost::RelayMessage(
261 const IPC::Message& message, 261 const IPC::Message& message,
262 SharedWorkerMessageFilter* incoming_filter) { 262 SharedWorkerMessageFilter* incoming_filter) {
263 if (!instance_) 263 if (!instance_)
264 return; 264 return;
265 if (message.type() == WorkerMsg_Connect::ID) { 265 if (message.type() == WorkerMsg_Connect::ID) {
266 // Crack the SharedWorker Connect message to setup routing for the port. 266 // Crack the SharedWorker Connect message to setup routing for the port.
267 WorkerMsg_Connect::Param param; 267 WorkerMsg_Connect::Param param;
268 if (!WorkerMsg_Connect::Read(&message, &param)) 268 if (!WorkerMsg_Connect::Read(&message, &param))
269 return; 269 return;
270 int sent_message_port_id = get<0>(param); 270 int sent_message_port_id = base::get<0>(param);
271 int new_routing_id = get<1>(param); 271 int new_routing_id = base::get<1>(param);
272 272
273 DCHECK(container_render_filter_); 273 DCHECK(container_render_filter_);
274 new_routing_id = container_render_filter_->GetNextRoutingID(); 274 new_routing_id = container_render_filter_->GetNextRoutingID();
275 MessagePortService::GetInstance()->UpdateMessagePort( 275 MessagePortService::GetInstance()->UpdateMessagePort(
276 sent_message_port_id, 276 sent_message_port_id,
277 container_render_filter_->message_port_message_filter(), 277 container_render_filter_->message_port_message_filter(),
278 new_routing_id); 278 new_routing_id);
279 SetMessagePortID( 279 SetMessagePortID(
280 incoming_filter, message.routing_id(), sent_message_port_id); 280 incoming_filter, message.routing_id(), sent_message_port_id);
281 // Resend the message with the new routing id. 281 // Resend the message with the new routing id.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 int message_port_id) { 347 int message_port_id) {
348 for (FilterList::iterator i = filters_.begin(); i != filters_.end(); ++i) { 348 for (FilterList::iterator i = filters_.begin(); i != filters_.end(); ++i) {
349 if (i->filter() == filter && i->route_id() == route_id) { 349 if (i->filter() == filter && i->route_id() == route_id) {
350 i->set_message_port_id(message_port_id); 350 i->set_message_port_id(message_port_id);
351 return; 351 return;
352 } 352 }
353 } 353 }
354 } 354 }
355 355
356 } // namespace content 356 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698