| OLD | NEW |
| 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 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include "base/android/scoped_java_ref.h" | 11 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/macros.h" |
| 9 #include "content/browser/accessibility/browser_accessibility.h" | 13 #include "content/browser/accessibility/browser_accessibility.h" |
| 10 | 14 |
| 11 namespace content { | 15 namespace content { |
| 12 | 16 |
| 13 class CONTENT_EXPORT BrowserAccessibilityAndroid : public BrowserAccessibility { | 17 class CONTENT_EXPORT BrowserAccessibilityAndroid : public BrowserAccessibility { |
| 14 public: | 18 public: |
| 15 // Overrides from BrowserAccessibility. | 19 // Overrides from BrowserAccessibility. |
| 16 void OnDataChanged() override; | 20 void OnDataChanged() override; |
| 17 bool IsNative() const override; | 21 bool IsNative() const override; |
| 18 void OnLocationChanged() override; | 22 void OnLocationChanged() override; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 int ColumnIndex() const; | 90 int ColumnIndex() const; |
| 87 int ColumnSpan() const; | 91 int ColumnSpan() const; |
| 88 | 92 |
| 89 float RangeMin() const; | 93 float RangeMin() const; |
| 90 float RangeMax() const; | 94 float RangeMax() const; |
| 91 float RangeCurrentValue() const; | 95 float RangeCurrentValue() const; |
| 92 | 96 |
| 93 // Calls GetLineBoundaries or GetWordBoundaries depending on the value | 97 // Calls GetLineBoundaries or GetWordBoundaries depending on the value |
| 94 // of |granularity|, or fails if anything else is passed in |granularity|. | 98 // of |granularity|, or fails if anything else is passed in |granularity|. |
| 95 void GetGranularityBoundaries(int granularity, | 99 void GetGranularityBoundaries(int granularity, |
| 96 std::vector<int32>* starts, | 100 std::vector<int32_t>* starts, |
| 97 std::vector<int32>* ends, | 101 std::vector<int32_t>* ends, |
| 98 int offset); | 102 int offset); |
| 99 | 103 |
| 100 // Append line start and end indices for the text of this node | 104 // Append line start and end indices for the text of this node |
| 101 // (as returned by GetText()), adding |offset| to each one. | 105 // (as returned by GetText()), adding |offset| to each one. |
| 102 void GetLineBoundaries(std::vector<int32>* line_starts, | 106 void GetLineBoundaries(std::vector<int32_t>* line_starts, |
| 103 std::vector<int32>* line_ends, | 107 std::vector<int32_t>* line_ends, |
| 104 int offset); | 108 int offset); |
| 105 | 109 |
| 106 // Append word start and end indices for the text of this node | 110 // Append word start and end indices for the text of this node |
| 107 // (as returned by GetText()) to |word_starts| and |word_ends|, | 111 // (as returned by GetText()) to |word_starts| and |word_ends|, |
| 108 // adding |offset| to each one. | 112 // adding |offset| to each one. |
| 109 void GetWordBoundaries(std::vector<int32>* word_starts, | 113 void GetWordBoundaries(std::vector<int32_t>* word_starts, |
| 110 std::vector<int32>* word_ends, | 114 std::vector<int32_t>* word_ends, |
| 111 int offset); | 115 int offset); |
| 112 | 116 |
| 113 private: | 117 private: |
| 114 // This gives BrowserAccessibility::Create access to the class constructor. | 118 // This gives BrowserAccessibility::Create access to the class constructor. |
| 115 friend class BrowserAccessibility; | 119 friend class BrowserAccessibility; |
| 116 | 120 |
| 117 BrowserAccessibilityAndroid(); | 121 BrowserAccessibilityAndroid(); |
| 118 | 122 |
| 119 bool HasOnlyStaticTextChildren() const; | 123 bool HasOnlyStaticTextChildren() const; |
| 120 bool HasOnlyTextAndImageChildren() const; | 124 bool HasOnlyTextAndImageChildren() const; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 135 bool first_time_; | 139 bool first_time_; |
| 136 base::string16 old_value_; | 140 base::string16 old_value_; |
| 137 base::string16 new_value_; | 141 base::string16 new_value_; |
| 138 | 142 |
| 139 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); | 143 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityAndroid); |
| 140 }; | 144 }; |
| 141 | 145 |
| 142 } // namespace content | 146 } // namespace content |
| 143 | 147 |
| 144 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ | 148 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_ANDROID_H_ |
| OLD | NEW |