| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "extensions/browser/event_router.h" | 5 #include "extensions/browser/event_router.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <tuple> | 9 #include <tuple> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 } | 496 } |
| 497 } | 497 } |
| 498 } | 498 } |
| 499 | 499 |
| 500 for (const EventListener* listener : listeners) { | 500 for (const EventListener* listener : listeners) { |
| 501 if (restrict_to_extension_id.empty() || | 501 if (restrict_to_extension_id.empty() || |
| 502 restrict_to_extension_id == listener->extension_id()) { | 502 restrict_to_extension_id == listener->extension_id()) { |
| 503 if (listener->process()) { | 503 if (listener->process()) { |
| 504 EventDispatchIdentifier dispatch_id(listener->GetBrowserContext(), | 504 EventDispatchIdentifier dispatch_id(listener->GetBrowserContext(), |
| 505 listener->extension_id()); | 505 listener->extension_id()); |
| 506 if (!ContainsKey(already_dispatched, dispatch_id)) { | 506 if (!base::ContainsKey(already_dispatched, dispatch_id)) { |
| 507 DispatchEventToProcess(listener->extension_id(), | 507 DispatchEventToProcess(listener->extension_id(), |
| 508 listener->listener_url(), listener->process(), | 508 listener->listener_url(), listener->process(), |
| 509 event, listener->filter(), | 509 event, listener->filter(), |
| 510 false /* did_enqueue */); | 510 false /* did_enqueue */); |
| 511 } | 511 } |
| 512 } | 512 } |
| 513 } | 513 } |
| 514 } | 514 } |
| 515 } | 515 } |
| 516 | 516 |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 const std::string& extension_id, | 893 const std::string& extension_id, |
| 894 const GURL& listener_url, | 894 const GURL& listener_url, |
| 895 content::BrowserContext* browser_context) | 895 content::BrowserContext* browser_context) |
| 896 : event_name(event_name), | 896 : event_name(event_name), |
| 897 extension_id(extension_id), | 897 extension_id(extension_id), |
| 898 listener_url(listener_url), | 898 listener_url(listener_url), |
| 899 browser_context(browser_context) { | 899 browser_context(browser_context) { |
| 900 } | 900 } |
| 901 | 901 |
| 902 } // namespace extensions | 902 } // namespace extensions |
| OLD | NEW |