| Index: chrome/browser/accessibility/accessibility_events.cc
|
| ===================================================================
|
| --- chrome/browser/accessibility/accessibility_events.cc (revision 114416)
|
| +++ chrome/browser/accessibility/accessibility_events.cc (working copy)
|
| @@ -33,8 +33,9 @@
|
| }
|
|
|
| AccessibilityControlInfo::AccessibilityControlInfo(
|
| - Profile* profile, const std::string& control_name)
|
| - : AccessibilityEventInfo(profile), name_(control_name) {
|
| + Profile* profile, const std::string& name)
|
| + : AccessibilityEventInfo(profile),
|
| + name_(name) {
|
| }
|
|
|
| AccessibilityControlInfo::~AccessibilityControlInfo() {
|
| @@ -43,6 +44,8 @@
|
| void AccessibilityControlInfo::SerializeToDict(DictionaryValue *dict) const {
|
| dict->SetString(keys::kNameKey, name_);
|
| dict->SetString(keys::kTypeKey, type());
|
| + if (!context_.empty())
|
| + dict->SetString(keys::kContextKey, context_);
|
| }
|
|
|
| AccessibilityWindowInfo::AccessibilityWindowInfo(Profile* profile,
|
| @@ -55,8 +58,10 @@
|
| }
|
|
|
| AccessibilityButtonInfo::AccessibilityButtonInfo(Profile* profile,
|
| - const std::string& button_name)
|
| + const std::string& button_name,
|
| + const std::string& context)
|
| : AccessibilityControlInfo(profile, button_name) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityButtonInfo::type() const {
|
| @@ -64,8 +69,11 @@
|
| }
|
|
|
| AccessibilityLinkInfo::AccessibilityLinkInfo(Profile* profile,
|
| - const std::string& link_name)
|
| - : AccessibilityControlInfo(profile, link_name) { }
|
| + const std::string& link_name,
|
| + const std::string& context)
|
| + : AccessibilityControlInfo(profile, link_name) {
|
| + set_context(context);
|
| +}
|
|
|
| const char* AccessibilityLinkInfo::type() const {
|
| return keys::kTypeLink;
|
| @@ -74,6 +82,7 @@
|
| AccessibilityRadioButtonInfo::AccessibilityRadioButtonInfo(
|
| Profile* profile,
|
| const std::string& name,
|
| + const std::string& context,
|
| bool checked,
|
| int item_index,
|
| int item_count)
|
| @@ -81,6 +90,7 @@
|
| checked_(checked),
|
| item_index_(item_index),
|
| item_count_(item_count) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityRadioButtonInfo::type() const {
|
| @@ -97,9 +107,11 @@
|
|
|
| AccessibilityCheckboxInfo::AccessibilityCheckboxInfo(Profile* profile,
|
| const std::string& name,
|
| + const std::string& context,
|
| bool checked)
|
| : AccessibilityControlInfo(profile, name),
|
| checked_(checked) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityCheckboxInfo::type() const {
|
| @@ -113,11 +125,13 @@
|
|
|
| AccessibilityTabInfo::AccessibilityTabInfo(Profile* profile,
|
| const std::string& tab_name,
|
| + const std::string& context,
|
| int tab_index,
|
| int tab_count)
|
| : AccessibilityControlInfo(profile, tab_name),
|
| tab_index_(tab_index),
|
| tab_count_(tab_count) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityTabInfo::type() const {
|
| @@ -132,6 +146,7 @@
|
|
|
| AccessibilityComboBoxInfo::AccessibilityComboBoxInfo(Profile* profile,
|
| const std::string& name,
|
| + const std::string& context,
|
| const std::string& value,
|
| int item_index,
|
| int item_count)
|
| @@ -139,6 +154,7 @@
|
| value_(value),
|
| item_index_(item_index),
|
| item_count_(item_count) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityComboBoxInfo::type() const {
|
| @@ -154,12 +170,14 @@
|
|
|
| AccessibilityTextBoxInfo::AccessibilityTextBoxInfo(Profile* profile,
|
| const std::string& name,
|
| + const std::string& context,
|
| bool password)
|
| : AccessibilityControlInfo(profile, name),
|
| value_(""),
|
| password_(password),
|
| selection_start_(0),
|
| selection_end_(0) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityTextBoxInfo::type() const {
|
| @@ -176,6 +194,7 @@
|
|
|
| AccessibilityListBoxInfo::AccessibilityListBoxInfo(Profile* profile,
|
| const std::string& name,
|
| + const std::string& context,
|
| const std::string& value,
|
| int item_index,
|
| int item_count)
|
| @@ -183,6 +202,7 @@
|
| value_(value),
|
| item_index_(item_index),
|
| item_count_(item_count) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityListBoxInfo::type() const {
|
| @@ -237,6 +257,7 @@
|
|
|
| AccessibilityMenuItemInfo::AccessibilityMenuItemInfo(Profile* profile,
|
| const std::string& name,
|
| + const std::string& context,
|
| bool has_submenu,
|
| int item_index,
|
| int item_count)
|
| @@ -244,6 +265,7 @@
|
| has_submenu_(has_submenu),
|
| item_index_(item_index),
|
| item_count_(item_count) {
|
| + set_context(context);
|
| }
|
|
|
| const char* AccessibilityMenuItemInfo::type() const {
|
|
|