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

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

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: Created 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser_accessibility_manager.h" 5 #include "content/browser/accessibility/browser_accessibility_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 return nullptr; 37 return nullptr;
38 } 38 }
39 39
40 } // namespace 40 } // namespace
41 41
42 // Map from AXTreeID to BrowserAccessibilityManager 42 // Map from AXTreeID to BrowserAccessibilityManager
43 using AXTreeIDMap = base::hash_map<ui::AXTreeIDRegistry::AXTreeID, 43 using AXTreeIDMap = base::hash_map<ui::AXTreeIDRegistry::AXTreeID,
44 BrowserAccessibilityManager*>; 44 BrowserAccessibilityManager*>;
45 base::LazyInstance<AXTreeIDMap> g_ax_tree_id_map = LAZY_INSTANCE_INITIALIZER; 45 base::LazyInstance<AXTreeIDMap>::DestructorAtExit g_ax_tree_id_map =
46 LAZY_INSTANCE_INITIALIZER;
46 47
47 // A function to call when focus changes, for testing only. 48 // A function to call when focus changes, for testing only.
48 base::LazyInstance<base::Closure> g_focus_change_callback_for_testing = 49 base::LazyInstance<base::Closure>::DestructorAtExit
49 LAZY_INSTANCE_INITIALIZER; 50 g_focus_change_callback_for_testing = LAZY_INSTANCE_INITIALIZER;
50 51
51 ui::AXTreeUpdate MakeAXTreeUpdate( 52 ui::AXTreeUpdate MakeAXTreeUpdate(
52 const ui::AXNodeData& node1, 53 const ui::AXNodeData& node1,
53 const ui::AXNodeData& node2 /* = ui::AXNodeData() */, 54 const ui::AXNodeData& node2 /* = ui::AXNodeData() */,
54 const ui::AXNodeData& node3 /* = ui::AXNodeData() */, 55 const ui::AXNodeData& node3 /* = ui::AXNodeData() */,
55 const ui::AXNodeData& node4 /* = ui::AXNodeData() */, 56 const ui::AXNodeData& node4 /* = ui::AXNodeData() */,
56 const ui::AXNodeData& node5 /* = ui::AXNodeData() */, 57 const ui::AXNodeData& node5 /* = ui::AXNodeData() */,
57 const ui::AXNodeData& node6 /* = ui::AXNodeData() */, 58 const ui::AXNodeData& node6 /* = ui::AXNodeData() */,
58 const ui::AXNodeData& node7 /* = ui::AXNodeData() */, 59 const ui::AXNodeData& node7 /* = ui::AXNodeData() */,
59 const ui::AXNodeData& node8 /* = ui::AXNodeData() */, 60 const ui::AXNodeData& node8 /* = ui::AXNodeData() */,
(...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 hit_test_result = parent; 1244 hit_test_result = parent;
1244 parent = parent->GetParent(); 1245 parent = parent->GetParent();
1245 } 1246 }
1246 1247
1247 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id(); 1248 last_hover_ax_tree_id_ = hit_test_result->manager()->ax_tree_id();
1248 last_hover_node_id_ = hit_test_result->GetId(); 1249 last_hover_node_id_ = hit_test_result->GetId();
1249 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect(); 1250 last_hover_bounds_ = hit_test_result->GetScreenBoundsRect();
1250 } 1251 }
1251 1252
1252 } // namespace content 1253 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698