| 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" |
| 11 #include "content/browser/accessibility/browser_accessibility_manager.h" | 11 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 12 #include "content/common/accessibility_messages.h" | 12 #include "content/common/accessibility_messages.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 #if !defined(OS_MACOSX) && \ | 16 #if !defined(OS_MACOSX) && \ |
| 17 !defined(OS_WIN) && \ | 17 !defined(OS_WIN) && \ |
| 18 !defined(TOOLKIT_GTK) && \ | |
| 19 !defined(OS_ANDROID) | 18 !defined(OS_ANDROID) |
| 20 // We have subclassess of BrowserAccessibility on Mac, Linux/GTK, | 19 // We have subclassess of BrowserAccessibility on Mac and Win. For any other |
| 21 // and Win. For any other platform, instantiate the base class. | 20 // platform, instantiate the base class. |
| 22 // static | 21 // static |
| 23 BrowserAccessibility* BrowserAccessibility::Create() { | 22 BrowserAccessibility* BrowserAccessibility::Create() { |
| 24 return new BrowserAccessibility(); | 23 return new BrowserAccessibility(); |
| 25 } | 24 } |
| 26 #endif | 25 #endif |
| 27 | 26 |
| 28 BrowserAccessibility::BrowserAccessibility() | 27 BrowserAccessibility::BrowserAccessibility() |
| 29 : manager_(NULL), | 28 : manager_(NULL), |
| 30 deprecated_parent_(NULL), | 29 deprecated_parent_(NULL), |
| 31 deprecated_index_in_parent_(0), | 30 deprecated_index_in_parent_(0), |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 if (GetRole() == ui::AX_ROLE_STATIC_TEXT) | 645 if (GetRole() == ui::AX_ROLE_STATIC_TEXT) |
| 647 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size()); | 646 return static_cast<int>(GetStringAttribute(ui::AX_ATTR_VALUE).size()); |
| 648 | 647 |
| 649 int len = 0; | 648 int len = 0; |
| 650 for (size_t i = 0; i < InternalChildCount(); ++i) | 649 for (size_t i = 0; i < InternalChildCount(); ++i) |
| 651 len += InternalGetChild(i)->GetStaticTextLenRecursive(); | 650 len += InternalGetChild(i)->GetStaticTextLenRecursive(); |
| 652 return len; | 651 return len; |
| 653 } | 652 } |
| 654 | 653 |
| 655 } // namespace content | 654 } // namespace content |
| OLD | NEW |