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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager_android.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_android.h" 5 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 12 matching lines...) Expand all
23 using base::android::AttachCurrentThread; 23 using base::android::AttachCurrentThread;
24 using base::android::JavaParamRef; 24 using base::android::JavaParamRef;
25 using base::android::ScopedJavaLocalRef; 25 using base::android::ScopedJavaLocalRef;
26 26
27 namespace content { 27 namespace content {
28 28
29 namespace { 29 namespace {
30 30
31 using SearchKeyToPredicateMap = 31 using SearchKeyToPredicateMap =
32 base::hash_map<base::string16, AccessibilityMatchPredicate>; 32 base::hash_map<base::string16, AccessibilityMatchPredicate>;
33 base::LazyInstance<SearchKeyToPredicateMap> g_search_key_to_predicate_map = 33 base::LazyInstance<SearchKeyToPredicateMap>::DestructorAtExit
34 LAZY_INSTANCE_INITIALIZER; 34 g_search_key_to_predicate_map = LAZY_INSTANCE_INITIALIZER;
35 base::LazyInstance<base::string16> g_all_search_keys = 35 base::LazyInstance<base::string16>::DestructorAtExit g_all_search_keys =
36 LAZY_INSTANCE_INITIALIZER; 36 LAZY_INSTANCE_INITIALIZER;
37 37
38 bool SectionPredicate( 38 bool SectionPredicate(
39 BrowserAccessibility* start, BrowserAccessibility* node) { 39 BrowserAccessibility* start, BrowserAccessibility* node) {
40 switch (node->GetRole()) { 40 switch (node->GetRole()) {
41 case ui::AX_ROLE_ARTICLE: 41 case ui::AX_ROLE_ARTICLE:
42 case ui::AX_ROLE_APPLICATION: 42 case ui::AX_ROLE_APPLICATION:
43 case ui::AX_ROLE_BANNER: 43 case ui::AX_ROLE_BANNER:
44 case ui::AX_ROLE_COMPLEMENTARY: 44 case ui::AX_ROLE_COMPLEMENTARY:
45 case ui::AX_ROLE_CONTENT_INFO: 45 case ui::AX_ROLE_CONTENT_INFO:
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 986
987 JNIEnv* env = AttachCurrentThread(); 987 JNIEnv* env = AttachCurrentThread();
988 return root_manager->java_ref().get(env); 988 return root_manager->java_ref().get(env);
989 } 989 }
990 990
991 bool RegisterBrowserAccessibilityManager(JNIEnv* env) { 991 bool RegisterBrowserAccessibilityManager(JNIEnv* env) {
992 return RegisterNativesImpl(env); 992 return RegisterNativesImpl(env);
993 } 993 }
994 994
995 } // namespace content 995 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698