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 "chrome/browser/accessibility/accessibility_events.h" | 5 #include "chrome/browser/accessibility/accessibility_events.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 | 8 |
9 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" | 9 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 const char* AccessibilityMenuItemInfo::type() const { | 234 const char* AccessibilityMenuItemInfo::type() const { |
235 return keys::kTypeMenuItem; | 235 return keys::kTypeMenuItem; |
236 } | 236 } |
237 | 237 |
238 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { | 238 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { |
239 AccessibilityControlInfo::SerializeToDict(dict); | 239 AccessibilityControlInfo::SerializeToDict(dict); |
240 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); | 240 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); |
241 dict->SetInteger(keys::kItemIndexKey, item_index_); | 241 dict->SetInteger(keys::kItemIndexKey, item_index_); |
242 dict->SetInteger(keys::kItemCountKey, item_count_); | 242 dict->SetInteger(keys::kItemCountKey, item_count_); |
243 } | 243 } |
| 244 |
| 245 AccessibilitySliderInfo::AccessibilitySliderInfo(Profile* profile, |
| 246 const std::string& name, |
| 247 const std::string& context, |
| 248 const std::string& value) |
| 249 : AccessibilityControlInfo(profile, name), |
| 250 value_(value) { |
| 251 set_context(context); |
| 252 } |
| 253 |
| 254 const char* AccessibilitySliderInfo::type() const { |
| 255 return keys::kTypeSlider; |
| 256 } |
| 257 |
| 258 void AccessibilitySliderInfo::SerializeToDict(DictionaryValue *dict) const { |
| 259 AccessibilityControlInfo::SerializeToDict(dict); |
| 260 dict->SetString(keys::kStringValueKey, value_); |
| 261 } |
OLD | NEW |