summaryrefslogtreecommitdiffstats
path: root/views/controls/button
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 18:54:50 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-26 18:54:50 +0000
commit0aaa52814089919103ffa3fee8081e5124c63875 (patch)
tree4b43ac8931e6beae4d5122803ed8724517e8e07c /views/controls/button
parentf4d92d437ea14ea3a02e95ec837dc6872ca6b183 (diff)
downloadchromium_src-0aaa52814089919103ffa3fee8081e5124c63875.zip
chromium_src-0aaa52814089919103ffa3fee8081e5124c63875.tar.gz
chromium_src-0aaa52814089919103ffa3fee8081e5124c63875.tar.bz2
Convert View::HasFocus() to be const. Required adding const versions of some accessors which in turn prompted me to make some uses of these accessors be a bit more const-correct.
BUG=none TEST=none Review URL: http://codereview.chromium.org/8393024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r--views/controls/button/button.cc2
-rw-r--r--views/controls/button/button.h3
-rw-r--r--views/controls/button/image_button.cc2
-rw-r--r--views/controls/button/image_button.h5
4 files changed, 7 insertions, 5 deletions
diff --git a/views/controls/button/button.cc b/views/controls/button/button.cc
index e9f7e2b..c43439c 100644
--- a/views/controls/button/button.cc
+++ b/views/controls/button/button.cc
@@ -31,7 +31,7 @@ void Button::SetAccessibleKeyboardShortcut(const string16& shortcut) {
////////////////////////////////////////////////////////////////////////////////
// Button, View overrides:
-bool Button::GetTooltipText(const gfx::Point& p, string16* tooltip) {
+bool Button::GetTooltipText(const gfx::Point& p, string16* tooltip) const {
if (tooltip_text_.empty())
return false;
diff --git a/views/controls/button/button.h b/views/controls/button/button.h
index f1f1a10..0884ea1 100644
--- a/views/controls/button/button.h
+++ b/views/controls/button/button.h
@@ -40,7 +40,8 @@ class VIEWS_EXPORT Button : public View {
void SetAccessibleKeyboardShortcut(const string16& shortcut);
// Overridden from View:
- virtual bool GetTooltipText(const gfx::Point& p, string16* tooltip) OVERRIDE;
+ virtual bool GetTooltipText(const gfx::Point& p,
+ string16* tooltip) const OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
protected:
diff --git a/views/controls/button/image_button.cc b/views/controls/button/image_button.cc
index 76ed12c..8379b41 100644
--- a/views/controls/button/image_button.cc
+++ b/views/controls/button/image_button.cc
@@ -163,7 +163,7 @@ void ToggleImageButton::SetImage(ButtonState state, const SkBitmap* image) {
// ToggleImageButton, View overrides:
bool ToggleImageButton::GetTooltipText(const gfx::Point& p,
- string16* tooltip) {
+ string16* tooltip) const {
if (!toggled_ || toggled_tooltip_text_.empty())
return Button::GetTooltipText(p, tooltip);
diff --git a/views/controls/button/image_button.h b/views/controls/button/image_button.h
index 0dc3ab4..2ba26fa 100644
--- a/views/controls/button/image_button.h
+++ b/views/controls/button/image_button.h
@@ -96,10 +96,11 @@ class VIEWS_EXPORT ToggleImageButton : public ImageButton {
void SetToggledTooltipText(const string16& tooltip);
// Overridden from ImageButton:
- virtual void SetImage(ButtonState aState, const SkBitmap* anImage);
+ virtual void SetImage(ButtonState aState, const SkBitmap* anImage) OVERRIDE;
// Overridden from View:
- virtual bool GetTooltipText(const gfx::Point& p, string16* tooltip);
+ virtual bool GetTooltipText(const gfx::Point& p,
+ string16* tooltip) const OVERRIDE;
private:
// The parent class's images_ member is used for the current images,