| OLD | NEW |
| 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 "chrome/browser/extensions/extension_event_router.h" | 5 #include "chrome/browser/extensions/extension_event_router.h" |
| 6 | 6 |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "chrome/browser/extensions/extension_devtools_manager.h" | 8 #include "chrome/browser/extensions/extension_devtools_manager.h" |
| 9 #include "chrome/browser/extensions/extension_processes_api.h" | 9 #include "chrome/browser/extensions/extension_processes_api.h" |
| 10 #include "chrome/browser/extensions/extension_processes_api_constants.h" | 10 #include "chrome/browser/extensions/extension_processes_api_constants.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener( | 29 ExtensionWebRequestEventRouter::GetInstance()->RemoveEventListener( |
| 30 profile, extension_id, sub_event_name); | 30 profile, extension_id, sub_event_name); |
| 31 } | 31 } |
| 32 | 32 |
| 33 } // namespace | 33 } // namespace |
| 34 | 34 |
| 35 struct ExtensionEventRouter::EventListener { | 35 struct ExtensionEventRouter::EventListener { |
| 36 RenderProcessHost* process; | 36 RenderProcessHost* process; |
| 37 std::string extension_id; | 37 std::string extension_id; |
| 38 | 38 |
| 39 explicit EventListener(RenderProcessHost* process, | 39 EventListener(RenderProcessHost* process, const std::string& extension_id) |
| 40 const std::string& extension_id) | |
| 41 : process(process), extension_id(extension_id) {} | 40 : process(process), extension_id(extension_id) {} |
| 42 | 41 |
| 43 bool operator<(const EventListener& that) const { | 42 bool operator<(const EventListener& that) const { |
| 44 if (process < that.process) | 43 if (process < that.process) |
| 45 return true; | 44 return true; |
| 46 if (process == that.process && extension_id < that.extension_id) | 45 if (process == that.process && extension_id < that.extension_id) |
| 47 return true; | 46 return true; |
| 48 return false; | 47 return false; |
| 49 } | 48 } |
| 50 }; | 49 }; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } | 241 } |
| 243 } | 242 } |
| 244 } | 243 } |
| 245 break; | 244 break; |
| 246 } | 245 } |
| 247 default: | 246 default: |
| 248 NOTREACHED(); | 247 NOTREACHED(); |
| 249 return; | 248 return; |
| 250 } | 249 } |
| 251 } | 250 } |
| OLD | NEW |