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

Side by Side Diff: content/browser/service_worker/embedded_worker_instance.cc

Issue 733703002: Make sure message ports that are transferred to a serviceworker end up in the right process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@service-worker-message-port-transfer
Patch Set: fix test compile Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/service_worker/embedded_worker_instance.h" 5 #include "content/browser/service_worker/embedded_worker_instance.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 const base::string16& message, 333 const base::string16& message,
334 int line_number, 334 int line_number,
335 const GURL& source_url) { 335 const GURL& source_url) {
336 FOR_EACH_OBSERVER( 336 FOR_EACH_OBSERVER(
337 Listener, 337 Listener,
338 listener_list_, 338 listener_list_,
339 OnReportConsoleMessage( 339 OnReportConsoleMessage(
340 source_identifier, message_level, message, line_number, source_url)); 340 source_identifier, message_level, message, line_number, source_url));
341 } 341 }
342 342
343 MessagePortMessageFilter* EmbeddedWorkerInstance::message_port_message_filter()
344 const {
345 return registry_->MessagePortMessageFilterForProcess(process_id_);
346 }
347
343 void EmbeddedWorkerInstance::AddListener(Listener* listener) { 348 void EmbeddedWorkerInstance::AddListener(Listener* listener) {
344 listener_list_.AddObserver(listener); 349 listener_list_.AddObserver(listener);
345 } 350 }
346 351
347 void EmbeddedWorkerInstance::RemoveListener(Listener* listener) { 352 void EmbeddedWorkerInstance::RemoveListener(Listener* listener) {
348 listener_list_.RemoveObserver(listener); 353 listener_list_.RemoveObserver(listener);
349 } 354 }
350 355
351 } // namespace content 356 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/embedded_worker_instance.h ('k') | content/browser/service_worker/embedded_worker_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698