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

Side by Side Diff: chrome/browser/ui/aura/accessibility/automation_manager_aura.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more errors Created 5 years, 4 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 #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"
11 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou ter.h" 11 #include "chrome/browser/extensions/api/automation_internal/automation_event_rou ter.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/common/extensions/chrome_extension_messages.h" 13 #include "chrome/common/extensions/chrome_extension_messages.h"
14 #include "content/public/browser/ax_event_notification_details.h" 14 #include "content/public/browser/ax_event_notification_details.h"
15 #include "content/public/browser/browser_context.h" 15 #include "content/public/browser/browser_context.h"
16 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
17 #include "ui/views/accessibility/ax_aura_obj_cache.h" 17 #include "ui/views/accessibility/ax_aura_obj_cache.h"
18 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" 18 #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
19 #include "ui/views/view.h" 19 #include "ui/views/view.h"
20 #include "ui/views/widget/widget.h" 20 #include "ui/views/widget/widget.h"
21 21
22 using content::BrowserContext; 22 using content::BrowserContext;
23 using extensions::AutomationEventRouter; 23 using extensions::AutomationEventRouter;
24 24
25 // static 25 // static
26 AutomationManagerAura* AutomationManagerAura::GetInstance() { 26 AutomationManagerAura* AutomationManagerAura::GetInstance() {
27 return Singleton<AutomationManagerAura>::get(); 27 return base::Singleton<AutomationManagerAura>::get();
28 } 28 }
29 29
30 void AutomationManagerAura::Enable(BrowserContext* context) { 30 void AutomationManagerAura::Enable(BrowserContext* context) {
31 enabled_ = true; 31 enabled_ = true;
32 if (!current_tree_.get()) 32 if (!current_tree_.get())
33 current_tree_.reset(new AXTreeSourceAura()); 33 current_tree_.reset(new AXTreeSourceAura());
34 ResetSerializer(); 34 ResetSerializer();
35 35
36 SendEvent(context, current_tree_->GetRoot(), ui::AX_EVENT_LOAD_COMPLETE); 36 SendEvent(context, current_tree_->GetRoot(), ui::AX_EVENT_LOAD_COMPLETE);
37 if (focused_window_) { 37 if (focused_window_) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 for (size_t i = 0; i < pending_events_copy.size(); ++i) { 141 for (size_t i = 0; i < pending_events_copy.size(); ++i) {
142 SendEvent(context, 142 SendEvent(context,
143 pending_events_copy[i].first, 143 pending_events_copy[i].first,
144 pending_events_copy[i].second); 144 pending_events_copy[i].second);
145 } 145 }
146 } 146 }
147 147
148 void AutomationManagerAura::OnNativeFocusChanged(aura::Window* focused_now) { 148 void AutomationManagerAura::OnNativeFocusChanged(aura::Window* focused_now) {
149 focused_window_ = focused_now; 149 focused_window_ = focused_now;
150 } 150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698