summaryrefslogtreecommitdiffstats
path: root/views/controls/button
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-14 13:33:23 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-14 13:33:23 +0000
commitc5be11f4e5663736128f7c0b34af155155a27806 (patch)
treee46c093059f09005cec058df6202dc4b4035a7f0 /views/controls/button
parent8bff0e34eb5f15a4f1210239a3aced0df9d5d317 (diff)
downloadchromium_src-c5be11f4e5663736128f7c0b34af155155a27806.zip
chromium_src-c5be11f4e5663736128f7c0b34af155155a27806.tar.gz
chromium_src-c5be11f4e5663736128f7c0b34af155155a27806.tar.bz2
Move views::Accelerator to ui in order to use it from aura code.
This is the first preliminary change for the support of global keyboard shortcut. BUG=97255 TEST=None Review URL: http://codereview.chromium.org/8508055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109872 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r--views/controls/button/custom_button.cc2
-rw-r--r--views/controls/button/custom_button.h2
-rw-r--r--views/controls/button/text_button.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc
index 05fac75..fc0c6b4 100644
--- a/views/controls/button/custom_button.cc
+++ b/views/controls/button/custom_button.cc
@@ -197,7 +197,7 @@ bool CustomButton::OnKeyReleased(const KeyEvent& event) {
return true;
}
-bool CustomButton::AcceleratorPressed(const Accelerator& accelerator) {
+bool CustomButton::AcceleratorPressed(const ui::Accelerator& accelerator) {
if (!View::IsEnabled())
return false;
diff --git a/views/controls/button/custom_button.h b/views/controls/button/custom_button.h
index 29e96d4..ae6a8bf 100644
--- a/views/controls/button/custom_button.h
+++ b/views/controls/button/custom_button.h
@@ -87,7 +87,7 @@ class VIEWS_EXPORT CustomButton : public Button,
virtual void OnMouseMoved(const MouseEvent& event) OVERRIDE;
virtual bool OnKeyPressed(const KeyEvent& event) OVERRIDE;
virtual bool OnKeyReleased(const KeyEvent& event) OVERRIDE;
- virtual bool AcceleratorPressed(const Accelerator& accelerator) OVERRIDE;
+ virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
virtual void ShowContextMenu(const gfx::Point& p,
bool is_mouse_gesture) OVERRIDE;
virtual void OnDragDone() OVERRIDE;
diff --git a/views/controls/button/text_button.cc b/views/controls/button/text_button.cc
index 0b138cd..0c5b9cc 100644
--- a/views/controls/button/text_button.cc
+++ b/views/controls/button/text_button.cc
@@ -304,9 +304,9 @@ void TextButtonBase::SetIsDefault(bool is_default) {
return;
is_default_ = is_default;
if (is_default_)
- AddAccelerator(Accelerator(ui::VKEY_RETURN, false, false, false));
+ AddAccelerator(ui::Accelerator(ui::VKEY_RETURN, false, false, false));
else
- RemoveAccelerator(Accelerator(ui::VKEY_RETURN, false, false, false));
+ RemoveAccelerator(ui::Accelerator(ui::VKEY_RETURN, false, false, false));
SchedulePaint();
}