| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_AUTOMATION_MANAGER_VIEWS_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_AUTOMATION_MANAGER_VIEWS_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 | |
| 11 #include "ui/accessibility/ax_tree_serializer.h" | |
| 12 #include "ui/views/accessibility/ax_tree_source_views.h" | |
| 13 | |
| 14 template <typename T> struct DefaultSingletonTraits; | |
| 15 | |
| 16 class Profile; | |
| 17 | |
| 18 namespace views { | |
| 19 class View; | |
| 20 } // namespace views | |
| 21 | |
| 22 // Manages a tree of automation nodes. | |
| 23 class AutomationManagerViews { | |
| 24 public: | |
| 25 // Get the single instance of this class. | |
| 26 static AutomationManagerViews* GetInstance(); | |
| 27 | |
| 28 // Handle an event fired upon a |View|. | |
| 29 void HandleEvent(Profile* profile, views::View* view, ui::AXEvent event_type); | |
| 30 | |
| 31 private: | |
| 32 friend struct DefaultSingletonTraits<AutomationManagerViews>; | |
| 33 | |
| 34 AutomationManagerViews(); | |
| 35 ~AutomationManagerViews(); | |
| 36 | |
| 37 // Holds the active views-based accessibility tree. A tree currently consists | |
| 38 // of all views descendant to a |Widget| (see |AXTreeSourceViews|). | |
| 39 // A tree becomes active when an event is fired on a descendant view. | |
| 40 scoped_ptr <views::AXTreeSourceViews> current_tree_; | |
| 41 | |
| 42 // Serializes incremental updates on the currently active tree | |
| 43 // |current_tree_|. | |
| 44 scoped_ptr<ui::AXTreeSerializer<views::View*> > current_tree_serializer_; | |
| 45 | |
| 46 DISALLOW_COPY_AND_ASSIGN(AutomationManagerViews); | |
| 47 }; | |
| 48 | |
| 49 #endif // CHROME_BROWSER_UI_VIEWS_ACCESSIBILITY_AUTOMATION_MANAGER_VIEWS_H_ | |
| OLD | NEW |