Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: chrome/browser/ui/ash/accessibility/ax_root_obj_wrapper.h

Issue 1003283002: Enable chrome.automation.getDesktop on all aura platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_ASH_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_
6 #define CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_ 6 #define CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/aura/env_observer.h"
11 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" 12 #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
12 13
13 namespace aura { 14 namespace aura {
14 class Window; 15 class Window;
15 } // namespace aura 16 } // namespace aura
16 17
17 class AXRootObjWrapper : public views::AXAuraObjWrapper { 18 class AXRootObjWrapper : public views::AXAuraObjWrapper,
19 public aura::EnvObserver {
18 public: 20 public:
19 explicit AXRootObjWrapper(int32 id); 21 explicit AXRootObjWrapper(int32 id);
20 ~AXRootObjWrapper() override; 22 ~AXRootObjWrapper() override;
21 23
22 // Returns an AXAuraObjWrapper for an alert window with title set to |text|. 24 // Returns an AXAuraObjWrapper for an alert window with title set to |text|.
23 views::AXAuraObjWrapper* GetAlertForText(const std::string& text); 25 views::AXAuraObjWrapper* GetAlertForText(const std::string& text);
24 26
25 // Convenience method to check for existence of a child. 27 // Convenience method to check for existence of a child.
26 bool HasChild(views::AXAuraObjWrapper* child); 28 bool HasChild(views::AXAuraObjWrapper* child);
27 29
28 // views::AXAuraObjWrapper overrides. 30 // views::AXAuraObjWrapper overrides.
29 views::AXAuraObjWrapper* GetParent() override; 31 views::AXAuraObjWrapper* GetParent() override;
30 void GetChildren( 32 void GetChildren(
31 std::vector<views::AXAuraObjWrapper*>* out_children) override; 33 std::vector<views::AXAuraObjWrapper*>* out_children) override;
32 void Serialize(ui::AXNodeData* out_node_data) override; 34 void Serialize(ui::AXNodeData* out_node_data) override;
33 int32 GetID() override; 35 int32 GetID() override;
34 36
37 // aura::EnvObserver overrides.
38 void OnWindowInitialized(aura::Window* window) override;
39 void OnHostActivated(aura::WindowTreeHost* host) override;
40
35 private: 41 private:
36 int32 id_; 42 int32 id_;
37 43
38 aura::Window* alert_window_; 44 aura::Window* alert_window_;
39 45
46 aura::WindowTreeHost* host_;
47
40 DISALLOW_COPY_AND_ASSIGN(AXRootObjWrapper); 48 DISALLOW_COPY_AND_ASSIGN(AXRootObjWrapper);
41 }; 49 };
42 50
43 #endif // CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_ 51 #endif // CHROME_BROWSER_UI_ASH_ACCESSIBILITY_AX_ROOT_OBJ_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698