Chromium Code Reviews| Index: chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h |
| diff --git a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h |
| index 1cc84f927adfd69f38ac00b08f674971545c3018..5025512d5d06c82c2e022dae51eae2684b76e039 100644 |
| --- a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h |
| +++ b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge.h |
| @@ -7,6 +7,8 @@ |
| #include <memory> |
| +#include "chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.h" |
| +#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| #include "components/arc/arc_service.h" |
| #include "components/arc/common/accessibility_helper.mojom.h" |
| #include "components/arc/instance_holder.h" |
| @@ -14,12 +16,6 @@ |
| #include "mojo/public/cpp/bindings/binding.h" |
| #include "ui/accessibility/ax_host_delegate.h" |
| -namespace views { |
| - |
| -class View; |
| - |
| -} // namespace views |
| - |
| namespace arc { |
| class ArcBridgeService; |
| @@ -33,7 +29,8 @@ class ArcAccessibilityHelperBridge |
| public mojom::AccessibilityHelperHost, |
| public InstanceHolder<mojom::AccessibilityHelperInstance>::Observer, |
| public exo::WMHelper::ActivationObserver, |
| - public ui::AXHostDelegate { |
| + public AXTreeSourceArc::Delegate, |
| + public ArcAppListPrefs::Observer { |
| public: |
| explicit ArcAccessibilityHelperBridge(ArcBridgeService* bridge_service); |
| ~ArcAccessibilityHelperBridge() override; |
| @@ -48,18 +45,36 @@ class ArcAccessibilityHelperBridge |
| void OnAccessibilityEvent( |
| mojom::AccessibilityEventDataPtr event_data) override; |
| + // AXTreeSourceArc::Delegate overrides. |
| + void OnAction(const ui::AXActionData& data) const override; |
| + |
| + // ArcAppListPrefs::Observer overrides. |
| + void OnTaskCreated(int task_id, |
| + const std::string& package_name, |
| + const std::string& activity, |
| + const std::string& intent) override; |
| + void OnTaskDestroyed(int task_id) override; |
|
dcheng
2017/05/10 06:36:42
Nit: the interface should be consistent about int3
David Tseng
2017/05/10 21:01:19
Done.
|
| + void OnTaskSetActive(int32_t task_id) override; |
| + |
| + const std::map<std::string, std::unique_ptr<AXTreeSourceArc>>& |
| + package_name_to_tree_for_test() { |
| + return package_name_to_tree_; |
| + } |
| + const std::map<std::string, std::set<int32_t>>& |
| + package_name_to_task_ids_for_test() { |
| + return package_name_to_task_ids_; |
| + } |
| + |
| private: |
| // exo::WMHelper::ActivationObserver overrides. |
| void OnWindowActivated(aura::Window* gained_active, |
| aura::Window* lost_active) override; |
| - // AXHostDelegate overrides. |
| - void PerformAction(const ui::AXActionData& data) override; |
| - |
| mojo::Binding<mojom::AccessibilityHelperHost> binding_; |
| - std::unique_ptr<AXTreeSourceArc> tree_source_; |
| - std::unique_ptr<views::View> focus_stealer_; |
| + std::map<std::string, std::unique_ptr<AXTreeSourceArc>> package_name_to_tree_; |
|
dcheng
2017/05/10 06:36:42
For IWYU, please #include <map>, <string>, <set>
David Tseng
2017/05/10 21:01:19
Done.
|
| + std::map<std::string, std::set<int32_t>> package_name_to_task_ids_; |
| + int32_t current_task_id_; |
| DISALLOW_COPY_AND_ASSIGN(ArcAccessibilityHelperBridge); |
| }; |