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 #include "chrome/browser/accessibility/accessibility_extension_api.h" | 8 #include "chrome/browser/accessibility/accessibility_extension_api.h" |
9 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" | 9 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 bool has_submenu, | 247 bool has_submenu, |
248 int item_index, | 248 int item_index, |
249 int item_count) | 249 int item_count) |
250 : AccessibilityControlInfo(profile, name), | 250 : AccessibilityControlInfo(profile, name), |
251 has_submenu_(has_submenu), | 251 has_submenu_(has_submenu), |
252 item_index_(item_index), | 252 item_index_(item_index), |
253 item_count_(item_count) { | 253 item_count_(item_count) { |
254 set_context(context); | 254 set_context(context); |
255 } | 255 } |
256 | 256 |
| 257 AccessibilityTreeItemInfo::AccessibilityTreeItemInfo( |
| 258 Profile* profile, |
| 259 const std::string& name, |
| 260 const std::string& context, |
| 261 bool has_submenu, |
| 262 int item_index, |
| 263 int item_count) |
| 264 : AccessibilityMenuItemInfo(profile, |
| 265 name, |
| 266 context, |
| 267 has_submenu, |
| 268 item_index, |
| 269 item_count) { |
| 270 } |
| 271 |
| 272 |
257 const char* AccessibilityMenuItemInfo::type() const { | 273 const char* AccessibilityMenuItemInfo::type() const { |
258 return keys::kTypeMenuItem; | 274 return keys::kTypeMenuItem; |
259 } | 275 } |
260 | 276 |
261 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { | 277 void AccessibilityMenuItemInfo::SerializeToDict(DictionaryValue *dict) const { |
262 AccessibilityControlInfo::SerializeToDict(dict); | 278 AccessibilityControlInfo::SerializeToDict(dict); |
263 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); | 279 dict->SetBoolean(keys::kHasSubmenuKey, has_submenu_); |
264 dict->SetInteger(keys::kItemIndexKey, item_index_); | 280 dict->SetInteger(keys::kItemIndexKey, item_index_); |
265 dict->SetInteger(keys::kItemCountKey, item_count_); | 281 dict->SetInteger(keys::kItemCountKey, item_count_); |
266 } | 282 } |
(...skipping 17 matching lines...) Expand all Loading... |
284 } | 300 } |
285 | 301 |
286 AccessibilityAlertInfo::AccessibilityAlertInfo(Profile* profile, | 302 AccessibilityAlertInfo::AccessibilityAlertInfo(Profile* profile, |
287 const std::string& name) | 303 const std::string& name) |
288 : AccessibilityControlInfo(profile, name) { | 304 : AccessibilityControlInfo(profile, name) { |
289 } | 305 } |
290 | 306 |
291 const char* AccessibilityAlertInfo::type() const { | 307 const char* AccessibilityAlertInfo::type() const { |
292 return keys::kTypeAlert; | 308 return keys::kTypeAlert; |
293 } | 309 } |
OLD | NEW |