OLD | NEW |
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 Loading... |
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 |
OLD | NEW |