Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: chrome/browser/accessibility/accessibility_events.h

Issue 8850004: Add a context field to the accessibility extension API. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/accessibility/accessibility_events.h
===================================================================
--- chrome/browser/accessibility/accessibility_events.h (revision 112880)
+++ chrome/browser/accessibility/accessibility_events.h (working copy)
@@ -59,11 +59,19 @@
const std::string& name() const { return name_; }
+ const std::string& context() const { return context_; }
+
protected:
- AccessibilityControlInfo(Profile* profile, const std::string& control_name);
+ AccessibilityControlInfo(Profile* profile,
+ const std::string& name,
+ const std::string& context);
// The name of the control, like "OK" or "Password".
std::string name_;
+
+ // A string describing the context of the control, such as the name of
+ // the group or toolbar it's contained in.
+ std::string context_;
};
// Accessibility information about a window passed to onWindowOpened
@@ -79,7 +87,9 @@
// and onControlAction event listeners.
class AccessibilityButtonInfo : public AccessibilityControlInfo {
public:
- AccessibilityButtonInfo(Profile* profile, const std::string& button_name);
+ AccessibilityButtonInfo(Profile* profile,
+ const std::string& button_name,
+ const std::string& context);
virtual const char* type() const OVERRIDE;
};
@@ -88,7 +98,9 @@
// and onControlAction event listeners.
class AccessibilityLinkInfo : public AccessibilityControlInfo {
public:
- AccessibilityLinkInfo(Profile* profile, const std::string& link_name);
+ AccessibilityLinkInfo(Profile* profile,
+ const std::string& link_name,
+ const std::string& context);
virtual const char* type() const OVERRIDE;
};
@@ -99,6 +111,7 @@
public:
AccessibilityRadioButtonInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool checked,
int item_index,
int item_count);
@@ -126,6 +139,7 @@
public:
AccessibilityCheckboxInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool checked);
virtual const char* type() const OVERRIDE;
@@ -146,6 +160,7 @@
public:
AccessibilityTabInfo(Profile* profile,
const std::string& tab_name,
+ const std::string& context,
int tab_index,
int tab_count);
@@ -173,6 +188,7 @@
public:
AccessibilityComboBoxInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
const std::string& value,
int item_index,
int item_count);
@@ -205,6 +221,7 @@
public:
AccessibilityTextBoxInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool password);
virtual const char* type() const OVERRIDE;
@@ -236,6 +253,7 @@
public:
AccessibilityListBoxInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
const std::string& value,
int item_index,
int item_count);
@@ -305,6 +323,7 @@
public:
AccessibilityMenuItemInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool has_submenu,
int item_index,
int item_count);

Powered by Google App Engine
This is Rietveld 408576698