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

Unified Diff: chrome/browser/accessibility_events.h

Issue 3073026: Expose the type of an AccessibilityControlInfo. (This will allow us... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months 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_events.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/accessibility_events.h
===================================================================
--- chrome/browser/accessibility_events.h (revision 55013)
+++ chrome/browser/accessibility_events.h (working copy)
@@ -31,6 +31,10 @@
// a JavaScript object.
virtual void SerializeToDict(DictionaryValue *dict) const;
+ // Return the specific type of this control, which will be one of the
+ // string constants defined in extension_accessibility_api_constants.h.
+ virtual const char* type() const = 0;
+
Profile* profile() const { return profile_; }
const std::string& name() const { return name_; }
@@ -54,7 +58,7 @@
AccessibilityWindowInfo(Profile* profile, std::string window_name)
: AccessibilityControlInfo(profile, window_name) { }
- virtual void SerializeToDict(DictionaryValue *dict) const;
+ virtual const char* type() const;
};
// Accessibility information about a push button passed to onControlFocused
@@ -64,7 +68,7 @@
AccessibilityButtonInfo(Profile* profile, std::string button_name)
: AccessibilityControlInfo(profile, button_name) { }
- virtual void SerializeToDict(DictionaryValue *dict) const;
+ virtual const char* type() const;
};
// Accessibility information about a hyperlink passed to onControlFocused
@@ -74,7 +78,7 @@
AccessibilityLinkInfo(Profile* profile, std::string link_name)
: AccessibilityControlInfo(profile, link_name) { }
- virtual void SerializeToDict(DictionaryValue *dict) const;
+ virtual const char* type() const;
};
// Accessibility information about a radio button passed to onControlFocused
@@ -92,6 +96,8 @@
item_count_(item_count) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
void SetChecked(bool checked) { checked_ = checked; }
@@ -114,6 +120,8 @@
checked_(checked) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
void SetChecked(bool checked) { checked_ = checked; }
@@ -135,6 +143,8 @@
tab_count_(tab_count) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
void SetTab(int tab_index, std::string tab_name) {
@@ -163,6 +173,8 @@
item_count_(item_count) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
void SetValue(int item_index, std::string value) {
@@ -193,6 +205,8 @@
selection_end_(0) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
void SetValue(std::string value, int selection_start, int selection_end) {
@@ -223,6 +237,8 @@
item_count_(item_count) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
void SetValue(int item_index, std::string value) {
@@ -246,7 +262,7 @@
AccessibilityMenuInfo(Profile* profile, std::string menu_name)
: AccessibilityControlInfo(profile, menu_name) { }
- virtual void SerializeToDict(DictionaryValue *dict) const;
+ virtual const char* type() const;
};
// Accessibility information about a menu item; this class is used by
@@ -264,6 +280,8 @@
item_count_(item_count) {
}
+ virtual const char* type() const;
+
virtual void SerializeToDict(DictionaryValue *dict) const;
private:
« no previous file with comments | « no previous file | chrome/browser/accessibility_events.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698