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

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

Issue 642313003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Including id in the AUTHORS file. Created 6 years, 2 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_android.h" 5 #include "content/browser/accessibility/browser_accessibility_android.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/accessibility/browser_accessibility_manager_android.h" 8 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
9 #include "content/common/accessibility_messages.h" 9 #include "content/common/accessibility_messages.h"
10 10
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 200
201 bool BrowserAccessibilityAndroid::IsVisibleToUser() const { 201 bool BrowserAccessibilityAndroid::IsVisibleToUser() const {
202 return !HasState(ui::AX_STATE_INVISIBLE); 202 return !HasState(ui::AX_STATE_INVISIBLE);
203 } 203 }
204 204
205 bool BrowserAccessibilityAndroid::CanOpenPopup() const { 205 bool BrowserAccessibilityAndroid::CanOpenPopup() const {
206 return HasState(ui::AX_STATE_HASPOPUP); 206 return HasState(ui::AX_STATE_HASPOPUP);
207 } 207 }
208 208
209 const char* BrowserAccessibilityAndroid::GetClassName() const { 209 const char* BrowserAccessibilityAndroid::GetClassName() const {
210 const char* class_name = NULL; 210 const char* class_name = nullptr;
211 211
212 switch(GetRole()) { 212 switch(GetRole()) {
213 case ui::AX_ROLE_EDITABLE_TEXT: 213 case ui::AX_ROLE_EDITABLE_TEXT:
214 case ui::AX_ROLE_SPIN_BUTTON: 214 case ui::AX_ROLE_SPIN_BUTTON:
215 case ui::AX_ROLE_TEXT_AREA: 215 case ui::AX_ROLE_TEXT_AREA:
216 case ui::AX_ROLE_TEXT_FIELD: 216 case ui::AX_ROLE_TEXT_FIELD:
217 class_name = "android.widget.EditText"; 217 class_name = "android.widget.EditText";
218 break; 218 break;
219 case ui::AX_ROLE_SLIDER: 219 case ui::AX_ROLE_SLIDER:
220 class_name = "android.widget.SeekBar"; 220 class_name = "android.widget.SeekBar";
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const { 644 int BrowserAccessibilityAndroid::CountChildrenWithRole(ui::AXRole role) const {
645 int count = 0; 645 int count = 0;
646 for (uint32 i = 0; i < PlatformChildCount(); i++) { 646 for (uint32 i = 0; i < PlatformChildCount(); i++) {
647 if (PlatformGetChild(i)->GetRole() == role) 647 if (PlatformGetChild(i)->GetRole() == role)
648 count++; 648 count++;
649 } 649 }
650 return count; 650 return count;
651 } 651 }
652 652
653 } // namespace content 653 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698