| 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_EVENT_ROUTE
R_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_EVENT_ROUTE
R_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_EVENT_ROUTE
R_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_EVENT_ROUTE
R_H_ |
| 7 | 7 |
| 8 #include <set> |
| 8 #include <vector> | 9 #include <vector> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 12 #include "chrome/common/extensions/api/automation_internal.h" | 13 #include "chrome/common/extensions/api/automation_internal.h" |
| 13 #include "content/public/browser/ax_event_notification_details.h" | 14 #include "content/public/browser/ax_event_notification_details.h" |
| 14 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 15 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 16 #include "extensions/common/extension.h" | 17 #include "extensions/common/extension_id.h" |
| 17 | 18 |
| 18 class Profile; | 19 class Profile; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class BrowserContext; | 22 class BrowserContext; |
| 22 } // namespace content | 23 } // namespace content |
| 23 | 24 |
| 24 struct ExtensionMsg_AccessibilityEventParams; | 25 struct ExtensionMsg_AccessibilityEventParams; |
| 25 | 26 |
| 26 namespace extensions { | 27 namespace extensions { |
| 27 | |
| 28 struct AutomationListener; | 28 struct AutomationListener; |
| 29 class Extension; |
| 29 | 30 |
| 30 class AutomationEventRouter : public content::NotificationObserver { | 31 class AutomationEventRouter : public content::NotificationObserver { |
| 31 public: | 32 public: |
| 32 static AutomationEventRouter* GetInstance(); | 33 static AutomationEventRouter* GetInstance(); |
| 33 | 34 |
| 34 // Indicates that the listener at |listener_process_id|, |listener_routing_id| | 35 // Indicates that the listener at |listener_process_id|, |listener_routing_id| |
| 35 // wants to receive automation events from the accessibility tree indicated | 36 // wants to receive automation events from the accessibility tree indicated |
| 36 // by |source_ax_tree_id|. Automation events are forwarded from now on | 37 // by |source_ax_tree_id|. Automation events are forwarded from now on |
| 37 // until the listener process dies. | 38 // until the listener process dies. |
| 38 void RegisterListenerForOneTree(const ExtensionId& extension_id, | 39 void RegisterListenerForOneTree(const ExtensionId& extension_id, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 Profile* active_profile_; | 104 Profile* active_profile_; |
| 104 | 105 |
| 105 friend struct base::DefaultSingletonTraits<AutomationEventRouter>; | 106 friend struct base::DefaultSingletonTraits<AutomationEventRouter>; |
| 106 | 107 |
| 107 DISALLOW_COPY_AND_ASSIGN(AutomationEventRouter); | 108 DISALLOW_COPY_AND_ASSIGN(AutomationEventRouter); |
| 108 }; | 109 }; |
| 109 | 110 |
| 110 } // namespace extensions | 111 } // namespace extensions |
| 111 | 112 |
| 112 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_EVENT_RO
UTER_H_ | 113 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_EVENT_RO
UTER_H_ |
| OLD | NEW |