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

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

Issue 1176583003: Move EqualsASCII to the base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util2
Patch Set: Created 5 years, 6 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 bool BrowserAccessibility::GetAriaTristate( 573 bool BrowserAccessibility::GetAriaTristate(
574 const char* html_attr, 574 const char* html_attr,
575 bool* is_defined, 575 bool* is_defined,
576 bool* is_mixed) const { 576 bool* is_mixed) const {
577 *is_defined = false; 577 *is_defined = false;
578 *is_mixed = false; 578 *is_mixed = false;
579 579
580 base::string16 value; 580 base::string16 value;
581 if (!GetHtmlAttribute(html_attr, &value) || 581 if (!GetHtmlAttribute(html_attr, &value) ||
582 value.empty() || 582 value.empty() ||
583 EqualsASCII(value, "undefined")) { 583 base::EqualsASCII(value, "undefined")) {
584 return false; // Not set (and *is_defined is also false) 584 return false; // Not set (and *is_defined is also false)
585 } 585 }
586 586
587 *is_defined = true; 587 *is_defined = true;
588 588
589 if (EqualsASCII(value, "true")) 589 if (base::EqualsASCII(value, "true"))
590 return true; 590 return true;
591 591
592 if (EqualsASCII(value, "mixed")) 592 if (base::EqualsASCII(value, "mixed"))
593 *is_mixed = true; 593 *is_mixed = true;
594 594
595 return false; // Not set 595 return false; // Not set
596 } 596 }
597 597
598 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { 598 bool BrowserAccessibility::HasState(ui::AXState state_enum) const {
599 return (GetState() >> state_enum) & 1; 599 return (GetState() >> state_enum) & 1;
600 } 600 }
601 601
602 bool BrowserAccessibility::IsCellOrTableHeaderRole() const { 602 bool BrowserAccessibility::IsCellOrTableHeaderRole() const {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } 729 }
730 need_to_offset_web_area = true; 730 need_to_offset_web_area = true;
731 } 731 }
732 parent = parent->GetParentForBoundsCalculation(); 732 parent = parent->GetParentForBoundsCalculation();
733 } 733 }
734 734
735 return bounds; 735 return bounds;
736 } 736 }
737 737
738 } // namespace content 738 } // namespace content
OLDNEW
« no previous file with comments | « chrome/renderer/web_apps.cc ('k') | content/browser/accessibility/browser_accessibility_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698