OLD | NEW |
---|---|
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 Loading... | |
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 base::StringPairs& |
Avi (use Gerrit)
2014/09/25 04:59:15
This was already broken, but functions in .cc file
MRV
2014/09/25 05:15:28
Done.
| |
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 Loading... | |
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 |
OLD | NEW |