summaryrefslogtreecommitdiffstats
path: root/chrome/browser/accessibility_events.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 08:49:59 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-19 08:49:59 +0000
commit9afad71d9433988f46ce38dca681e25ed39a4a82 (patch)
treebbbcb86d3f8eb0fef2dc2e3a091e3d3527c11338 /chrome/browser/accessibility_events.h
parent0c0762cf753027e688d5fcfbebe26b26c5a2820b (diff)
downloadchromium_src-9afad71d9433988f46ce38dca681e25ed39a4a82.zip
chromium_src-9afad71d9433988f46ce38dca681e25ed39a4a82.tar.gz
chromium_src-9afad71d9433988f46ce38dca681e25ed39a4a82.tar.bz2
Minor cleanup of AccessibilityEvents:
Use const ref instead of copying. No inlining of ctor/dtor. BUG=None TEST=None Review URL: http://codereview.chromium.org/3785002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/accessibility_events.h')
-rw-r--r--chrome/browser/accessibility_events.h32
1 files changed, 15 insertions, 17 deletions
diff --git a/chrome/browser/accessibility_events.h b/chrome/browser/accessibility_events.h
index 2995e77..47d50fb 100644
--- a/chrome/browser/accessibility_events.h
+++ b/chrome/browser/accessibility_events.h
@@ -24,7 +24,7 @@ void SendAccessibilityNotification(
// passed to event listeners.
class AccessibilityControlInfo {
public:
- virtual ~AccessibilityControlInfo() { }
+ virtual ~AccessibilityControlInfo();
// Serialize this class as a DictionaryValue that can be converted to
// a JavaScript object.
@@ -39,9 +39,7 @@ class AccessibilityControlInfo {
const std::string& name() const { return name_; }
protected:
- // The constructor can only be called by subclasses.
- AccessibilityControlInfo(Profile* profile, std::string control_name)
- : profile_(profile), name_(control_name) { }
+ AccessibilityControlInfo(Profile* profile, const std::string& control_name);
// The profile this control belongs to.
Profile* profile_;
@@ -54,7 +52,7 @@ class AccessibilityControlInfo {
// and onWindowClosed event listeners.
class AccessibilityWindowInfo : public AccessibilityControlInfo {
public:
- AccessibilityWindowInfo(Profile* profile, std::string window_name);
+ AccessibilityWindowInfo(Profile* profile, const std::string& window_name);
virtual const char* type() const;
};
@@ -63,7 +61,7 @@ class AccessibilityWindowInfo : public AccessibilityControlInfo {
// and onControlAction event listeners.
class AccessibilityButtonInfo : public AccessibilityControlInfo {
public:
- AccessibilityButtonInfo(Profile* profile, std::string button_name);
+ AccessibilityButtonInfo(Profile* profile, const std::string& button_name);
virtual const char* type() const;
};
@@ -72,7 +70,7 @@ class AccessibilityButtonInfo : public AccessibilityControlInfo {
// and onControlAction event listeners.
class AccessibilityLinkInfo : public AccessibilityControlInfo {
public:
- AccessibilityLinkInfo(Profile* profile, std::string link_name);
+ AccessibilityLinkInfo(Profile* profile, const std::string& link_name);
virtual const char* type() const;
};
@@ -82,7 +80,7 @@ class AccessibilityLinkInfo : public AccessibilityControlInfo {
class AccessibilityRadioButtonInfo : public AccessibilityControlInfo {
public:
AccessibilityRadioButtonInfo(Profile* profile,
- std::string name,
+ const std::string& name,
bool checked,
int item_index,
int item_count);
@@ -109,7 +107,7 @@ class AccessibilityRadioButtonInfo : public AccessibilityControlInfo {
class AccessibilityCheckboxInfo : public AccessibilityControlInfo {
public:
AccessibilityCheckboxInfo(Profile* profile,
- std::string name,
+ const std::string& name,
bool checked);
virtual const char* type() const;
@@ -129,7 +127,7 @@ class AccessibilityCheckboxInfo : public AccessibilityControlInfo {
class AccessibilityTabInfo : public AccessibilityControlInfo {
public:
AccessibilityTabInfo(Profile* profile,
- std::string tab_name,
+ const std::string& tab_name,
int tab_index,
int tab_count);
@@ -156,8 +154,8 @@ class AccessibilityTabInfo : public AccessibilityControlInfo {
class AccessibilityComboBoxInfo : public AccessibilityControlInfo {
public:
AccessibilityComboBoxInfo(Profile* profile,
- std::string name,
- std::string value,
+ const std::string& name,
+ const std::string& value,
int item_index,
int item_count);
@@ -188,7 +186,7 @@ class AccessibilityComboBoxInfo : public AccessibilityControlInfo {
class AccessibilityTextBoxInfo : public AccessibilityControlInfo {
public:
AccessibilityTextBoxInfo(Profile* profile,
- std::string name,
+ const std::string& name,
bool password);
virtual const char* type() const;
@@ -218,8 +216,8 @@ class AccessibilityTextBoxInfo : public AccessibilityControlInfo {
class AccessibilityListBoxInfo : public AccessibilityControlInfo {
public:
AccessibilityListBoxInfo(Profile* profile,
- std::string name,
- std::string value,
+ const std::string& name,
+ const std::string& value,
int item_index,
int item_count);
@@ -249,7 +247,7 @@ class AccessibilityListBoxInfo : public AccessibilityControlInfo {
// onMenuOpened, onMenuClosed, and onControlFocused event listeners.
class AccessibilityMenuInfo : public AccessibilityControlInfo {
public:
- AccessibilityMenuInfo(Profile* profile, std::string menu_name);
+ AccessibilityMenuInfo(Profile* profile, const std::string& menu_name);
virtual const char* type() const;
};
@@ -259,7 +257,7 @@ class AccessibilityMenuInfo : public AccessibilityControlInfo {
class AccessibilityMenuItemInfo : public AccessibilityControlInfo {
public:
AccessibilityMenuItemInfo(Profile* profile,
- std::string name,
+ const std::string& name,
bool has_submenu,
int item_index,
int item_count);