| OLD | NEW |
| 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 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 5 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
| 23 #include "ash/wm/window_util.h" | 23 #include "ash/wm/window_util.h" |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 using content::BrowserContext; | 26 using content::BrowserContext; |
| 27 using extensions::AutomationEventRouter; | 27 using extensions::AutomationEventRouter; |
| 28 | 28 |
| 29 // static | 29 // static |
| 30 AutomationManagerAura* AutomationManagerAura::GetInstance() { | 30 AutomationManagerAura* AutomationManagerAura::GetInstance() { |
| 31 return Singleton<AutomationManagerAura>::get(); | 31 return base::Singleton<AutomationManagerAura>::get(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void AutomationManagerAura::Enable(BrowserContext* context) { | 34 void AutomationManagerAura::Enable(BrowserContext* context) { |
| 35 enabled_ = true; | 35 enabled_ = true; |
| 36 if (!current_tree_.get()) | 36 if (!current_tree_.get()) |
| 37 current_tree_.reset(new AXTreeSourceAura()); | 37 current_tree_.reset(new AXTreeSourceAura()); |
| 38 ResetSerializer(); | 38 ResetSerializer(); |
| 39 | 39 |
| 40 SendEvent(context, current_tree_->GetRoot(), ui::AX_EVENT_LOAD_COMPLETE); | 40 SendEvent(context, current_tree_->GetRoot(), ui::AX_EVENT_LOAD_COMPLETE); |
| 41 | 41 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 processing_events_ = false; | 142 processing_events_ = false; |
| 143 auto pending_events_copy = pending_events_; | 143 auto pending_events_copy = pending_events_; |
| 144 pending_events_.clear(); | 144 pending_events_.clear(); |
| 145 for (size_t i = 0; i < pending_events_copy.size(); ++i) { | 145 for (size_t i = 0; i < pending_events_copy.size(); ++i) { |
| 146 SendEvent(context, | 146 SendEvent(context, |
| 147 pending_events_copy[i].first, | 147 pending_events_copy[i].first, |
| 148 pending_events_copy[i].second); | 148 pending_events_copy[i].second); |
| 149 } | 149 } |
| 150 } | 150 } |
| OLD | NEW |