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

Side by Side Diff: content/browser/accessibility/browser_accessibility.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.h" 5 #include "content/browser/accessibility/browser_accessibility.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "content/browser/accessibility/browser_accessibility_manager.h" 14 #include "content/browser/accessibility/browser_accessibility_manager.h"
15 #include "content/common/accessibility_messages.h" 15 #include "content/common/accessibility_messages.h"
16 #include "ui/accessibility/ax_role_properties.h" 16 #include "ui/accessibility/ax_role_properties.h"
17 #include "ui/accessibility/ax_text_utils.h" 17 #include "ui/accessibility/ax_text_utils.h"
18 #include "ui/accessibility/platform/ax_platform_node.h" 18 #include "ui/accessibility/platform/ax_platform_node.h"
19 #include "ui/gfx/geometry/rect_conversions.h" 19 #include "ui/gfx/geometry/rect_conversions.h"
20 #include "ui/gfx/geometry/rect_f.h" 20 #include "ui/gfx/geometry/rect_f.h"
21 21
22 namespace content { 22 namespace content {
23 23
24 namespace { 24 namespace {
25 25
26 // Map from unique_id to BrowserAccessibility 26 // Map from unique_id to BrowserAccessibility
27 using UniqueIDMap = base::hash_map<int32_t, BrowserAccessibility*>; 27 using UniqueIDMap = base::hash_map<int32_t, BrowserAccessibility*>;
28 base::LazyInstance<UniqueIDMap> g_unique_id_map = LAZY_INSTANCE_INITIALIZER; 28 base::LazyInstance<UniqueIDMap>::DestructorAtExit g_unique_id_map =
29 29 LAZY_INSTANCE_INITIALIZER;
30 } 30 }
31 31
32 #if !defined(PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL) 32 #if !defined(PLATFORM_HAS_NATIVE_ACCESSIBILITY_IMPL)
33 // static 33 // static
34 BrowserAccessibility* BrowserAccessibility::Create() { 34 BrowserAccessibility* BrowserAccessibility::Create() {
35 return new BrowserAccessibility(); 35 return new BrowserAccessibility();
36 } 36 }
37 #endif 37 #endif
38 38
39 BrowserAccessibility::BrowserAccessibility() 39 BrowserAccessibility::BrowserAccessibility()
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 } 1217 }
1218 } 1218 }
1219 1219
1220 node = container; 1220 node = container;
1221 } 1221 }
1222 1222
1223 return gfx::ToEnclosingRect(bounds); 1223 return gfx::ToEnclosingRect(bounds);
1224 } 1224 }
1225 1225
1226 } // namespace content 1226 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698