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

Side by Side Diff: content/browser/accessibility/ax_tree_id_registry.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 "content/browser/accessibility/ax_tree_id_registry.h" 5 #include "content/browser/accessibility/ax_tree_id_registry.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 // static 11 // static
12 const AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::kNoAXTreeID = -1; 12 const AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::kNoAXTreeID = -1;
13 13
14 // static 14 // static
15 AXTreeIDRegistry* AXTreeIDRegistry::GetInstance() { 15 AXTreeIDRegistry* AXTreeIDRegistry::GetInstance() {
16 return Singleton<AXTreeIDRegistry>::get(); 16 return base::Singleton<AXTreeIDRegistry>::get();
17 } 17 }
18 18
19 AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::GetOrCreateAXTreeID( 19 AXTreeIDRegistry::AXTreeID AXTreeIDRegistry::GetOrCreateAXTreeID(
20 int process_id, int routing_id) { 20 int process_id, int routing_id) {
21 FrameID frame_id(process_id, routing_id); 21 FrameID frame_id(process_id, routing_id);
22 std::map<FrameID, AXTreeID>::iterator it; 22 std::map<FrameID, AXTreeID>::iterator it;
23 it = frame_to_ax_tree_id_map_.find(frame_id); 23 it = frame_to_ax_tree_id_map_.find(frame_id);
24 if (it != frame_to_ax_tree_id_map_.end()) 24 if (it != frame_to_ax_tree_id_map_.end())
25 return it->second; 25 return it->second;
26 26
(...skipping 25 matching lines...) Expand all
52 52
53 AXTreeIDRegistry::AXTreeIDRegistry() : ax_tree_id_counter_(-1) { 53 AXTreeIDRegistry::AXTreeIDRegistry() : ax_tree_id_counter_(-1) {
54 // Always populate default desktop tree value (0 -> 0, 0). 54 // Always populate default desktop tree value (0 -> 0, 0).
55 GetOrCreateAXTreeID(0, 0); 55 GetOrCreateAXTreeID(0, 0);
56 } 56 }
57 57
58 AXTreeIDRegistry::~AXTreeIDRegistry() { 58 AXTreeIDRegistry::~AXTreeIDRegistry() {
59 } 59 }
60 60
61 } // namespace content 61 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/ax_tree_id_registry.h ('k') | content/browser/accessibility/browser_accessibility_state_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698