OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/api/automation_internal/automation_event_rou
ter.h" | 5 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou
ter.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_TREE_DESTROYED, | 96 events::AUTOMATION_INTERNAL_ON_ACCESSIBILITY_TREE_DESTROYED, |
97 api::automation_internal::OnAccessibilityTreeDestroyed::kEventName, | 97 api::automation_internal::OnAccessibilityTreeDestroyed::kEventName, |
98 std::move(args))); | 98 std::move(args))); |
99 event->restrict_to_browser_context = browser_context; | 99 event->restrict_to_browser_context = browser_context; |
100 EventRouter::Get(browser_context)->BroadcastEvent(std::move(event)); | 100 EventRouter::Get(browser_context)->BroadcastEvent(std::move(event)); |
101 } | 101 } |
102 | 102 |
103 AutomationEventRouter::AutomationListener::AutomationListener() { | 103 AutomationEventRouter::AutomationListener::AutomationListener() { |
104 } | 104 } |
105 | 105 |
| 106 AutomationEventRouter::AutomationListener::AutomationListener( |
| 107 const AutomationListener& other) = default; |
| 108 |
106 AutomationEventRouter::AutomationListener::~AutomationListener() { | 109 AutomationEventRouter::AutomationListener::~AutomationListener() { |
107 } | 110 } |
108 | 111 |
109 void AutomationEventRouter::Register( | 112 void AutomationEventRouter::Register( |
110 const ExtensionId& extension_id, | 113 const ExtensionId& extension_id, |
111 int listener_process_id, | 114 int listener_process_id, |
112 int listener_routing_id, | 115 int listener_routing_id, |
113 int ax_tree_id, | 116 int ax_tree_id, |
114 bool desktop) { | 117 bool desktop) { |
115 auto iter = std::find_if( | 118 auto iter = std::find_if( |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // only mark one as active. | 186 // only mark one as active. |
184 listener.is_active_profile = (extension_id_count == 1 || | 187 listener.is_active_profile = (extension_id_count == 1 || |
185 rph->GetBrowserContext() == active_profile_); | 188 rph->GetBrowserContext() == active_profile_); |
186 #else | 189 #else |
187 listener.is_active_profile = true; | 190 listener.is_active_profile = true; |
188 #endif | 191 #endif |
189 } | 192 } |
190 } | 193 } |
191 | 194 |
192 } // namespace extensions | 195 } // namespace extensions |
OLD | NEW |