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

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

Issue 598323002: Use of base::StringPairs appropriately in content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Resolving the scoping error Created 6 years, 3 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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 int32 BrowserAccessibility::GetRole() const { 168 int32 BrowserAccessibility::GetRole() const {
169 return GetData().role; 169 return GetData().role;
170 } 170 }
171 171
172 int32 BrowserAccessibility::GetState() const { 172 int32 BrowserAccessibility::GetState() const {
173 return GetData().state; 173 return GetData().state;
174 } 174 }
175 175
176 const std::vector<std::pair<std::string, std::string> >& 176 const BrowserAccessibility::HtmlAttributes&
177 BrowserAccessibility::GetHtmlAttributes() const { 177 BrowserAccessibility::GetHtmlAttributes() const {
178 return GetData().html_attributes; 178 return GetData().html_attributes;
179 } 179 }
180 180
181 gfx::Rect BrowserAccessibility::GetLocalBoundsRect() const { 181 gfx::Rect BrowserAccessibility::GetLocalBoundsRect() const {
182 gfx::Rect bounds = GetLocation(); 182 gfx::Rect bounds = GetLocation();
183 183
184 // Walk up the parent chain. Every time we encounter a Web Area, offset 184 // Walk up the parent chain. Every time we encounter a Web Area, offset
185 // based on the scroll bars and then offset based on the origin of that 185 // based on the scroll bars and then offset based on the origin of that
186 // nested web area. 186 // nested web area.
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 if (GetRole() == ui::AX_ROLE_STATIC_TEXT) 694 if (GetRole() == ui::AX_ROLE_STATIC_TEXT)
695 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size()); 695 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size());
696 696
697 int len = 0; 697 int len = 0;
698 for (size_t i = 0; i < InternalChildCount(); ++i) 698 for (size_t i = 0; i < InternalChildCount(); ++i)
699 len += InternalGetChild(i)->GetStaticTextLenRecursive(); 699 len += InternalGetChild(i)->GetStaticTextLenRecursive();
700 return len; 700 return len;
701 } 701 }
702 702
703 } // namespace content 703 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | content/browser/transition_request_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698