OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ | 5 #ifndef CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
6 #define CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ | 6 #define CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 class AccessibilityTextBoxInfo : public AccessibilityControlInfo { | 186 class AccessibilityTextBoxInfo : public AccessibilityControlInfo { |
187 public: | 187 public: |
188 AccessibilityTextBoxInfo(Profile* profile, | 188 AccessibilityTextBoxInfo(Profile* profile, |
189 const std::string& name, | 189 const std::string& name, |
190 bool password); | 190 bool password); |
191 | 191 |
192 virtual const char* type() const; | 192 virtual const char* type() const; |
193 | 193 |
194 virtual void SerializeToDict(DictionaryValue* dict) const; | 194 virtual void SerializeToDict(DictionaryValue* dict) const; |
195 | 195 |
196 void SetValue(std::string value, int selection_start, int selection_end) { | 196 void SetValue( |
| 197 const std::string& value, int selection_start, int selection_end) { |
197 value_ = value; | 198 value_ = value; |
198 selection_start_ = selection_start; | 199 selection_start_ = selection_start; |
199 selection_end_ = selection_end; | 200 selection_end_ = selection_end; |
200 } | 201 } |
201 | 202 |
202 const std::string& value() const { return value_; } | 203 const std::string& value() const { return value_; } |
203 bool password() const { return password_; } | 204 bool password() const { return password_; } |
204 int selection_start() const { return selection_start_; } | 205 int selection_start() const { return selection_start_; } |
205 int selection_end() const { return selection_end_; } | 206 int selection_end() const { return selection_end_; } |
206 | 207 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 bool has_submenu() const { return has_submenu_; } | 272 bool has_submenu() const { return has_submenu_; } |
272 | 273 |
273 private: | 274 private: |
274 bool has_submenu_; | 275 bool has_submenu_; |
275 // The 0-based index of the current item and the number of total items. | 276 // The 0-based index of the current item and the number of total items. |
276 int item_index_; | 277 int item_index_; |
277 int item_count_; | 278 int item_count_; |
278 }; | 279 }; |
279 | 280 |
280 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ | 281 #endif // CHROME_BROWSER_ACCESSIBILITY_EVENTS_H_ |
OLD | NEW |