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

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
« no previous file with comments | « no previous file | chrome/browser/accessibility/accessibility_events.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/accessibility/accessibility_events.h
===================================================================
--- chrome/browser/accessibility/accessibility_events.h (revision 114416)
+++ chrome/browser/accessibility/accessibility_events.h (working copy)
@@ -59,11 +59,20 @@
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);
+ void set_context(const std::string& context) { context_ = 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 +88,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 +99,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 +112,7 @@
public:
AccessibilityRadioButtonInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool checked,
int item_index,
int item_count);
@@ -126,6 +140,7 @@
public:
AccessibilityCheckboxInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool checked);
virtual const char* type() const OVERRIDE;
@@ -146,6 +161,7 @@
public:
AccessibilityTabInfo(Profile* profile,
const std::string& tab_name,
+ const std::string& context,
int tab_index,
int tab_count);
@@ -173,6 +189,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 +222,7 @@
public:
AccessibilityTextBoxInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool password);
virtual const char* type() const OVERRIDE;
@@ -236,6 +254,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 +324,7 @@
public:
AccessibilityMenuItemInfo(Profile* profile,
const std::string& name,
+ const std::string& context,
bool has_submenu,
int item_index,
int item_count);
« no previous file with comments | « no previous file | chrome/browser/accessibility/accessibility_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698