summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 20:58:01 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-03 20:58:01 +0000
commita071e653c8e2b9b77c412600c3d35de814541527 (patch)
tree4f6edf175b8090a8140d511b72ae0879fbacfec2 /chrome/browser/views/tabs
parentd78f40f3543cd057d845625d1abce9cd79b0682c (diff)
downloadchromium_src-a071e653c8e2b9b77c412600c3d35de814541527.zip
chromium_src-a071e653c8e2b9b77c412600c3d35de814541527.tar.gz
chromium_src-a071e653c8e2b9b77c412600c3d35de814541527.tar.bz2
Fix 9867: Activating the previous/next buttons with the keyboard in the find bar should not change the focus.
Add param const Event& event to ButtonPressed, so that recipients can find out more about the event that generated the ButtonPress message. BUG=9687 TEST=Open www.google.com and open Find-in-page, search for 'e'. Press FindNext button with mouse and note that the focus should be on the textfield. Now press Tab twice to put focus on the FindNext button and press SpaceBar a few times. Note that the focus should stay on the FindNext button. Review URL: http://codereview.chromium.org/188016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs')
-rw-r--r--chrome/browser/views/tabs/tab.cc2
-rw-r--r--chrome/browser/views/tabs/tab.h2
-rw-r--r--chrome/browser/views/tabs/tab_2.cc2
-rw-r--r--chrome/browser/views/tabs/tab_2.h2
-rw-r--r--chrome/browser/views/tabs/tab_renderer.h3
-rw-r--r--chrome/browser/views/tabs/tab_strip.cc2
-rw-r--r--chrome/browser/views/tabs/tab_strip.h2
7 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/views/tabs/tab.cc b/chrome/browser/views/tabs/tab.cc
index 14d416c..95ea76a 100644
--- a/chrome/browser/views/tabs/tab.cc
+++ b/chrome/browser/views/tabs/tab.cc
@@ -221,7 +221,7 @@ void Tab::ShowContextMenu(views::View* source, int x, int y,
///////////////////////////////////////////////////////////////////////////////
// views::ButtonListener implementation:
-void Tab::ButtonPressed(views::Button* sender) {
+void Tab::ButtonPressed(views::Button* sender, const views::Event& event) {
if (sender == close_button())
delegate_->CloseTab(this);
}
diff --git a/chrome/browser/views/tabs/tab.h b/chrome/browser/views/tabs/tab.h
index ad918a2..a7a8d91 100644
--- a/chrome/browser/views/tabs/tab.h
+++ b/chrome/browser/views/tabs/tab.h
@@ -109,7 +109,7 @@ class Tab : public TabRenderer,
bool is_mouse_gesture);
// views::ButtonListener overrides:
- virtual void ButtonPressed(views::Button* sender);
+ virtual void ButtonPressed(views::Button* sender, const views::Event& event);
// Creates a path that contains the clickable region of the tab's visual
// representation. Used by GetViewForPoint for hit-testing.
diff --git a/chrome/browser/views/tabs/tab_2.cc b/chrome/browser/views/tabs/tab_2.cc
index 14a8188..8065060 100644
--- a/chrome/browser/views/tabs/tab_2.cc
+++ b/chrome/browser/views/tabs/tab_2.cc
@@ -273,7 +273,7 @@ void Tab2::AddTabShapeToPath(gfx::Path* path) const {
///////////////////////////////////////////////////////////////////////////////
// Tab2, views::ButtonListener implementation:
-void Tab2::ButtonPressed(views::Button* sender) {
+void Tab2::ButtonPressed(views::Button* sender, const views::Event& event) {
if (sender == close_button_)
model_->CloseTab(this);
}
diff --git a/chrome/browser/views/tabs/tab_2.h b/chrome/browser/views/tabs/tab_2.h
index 4af97ec..079d39c 100644
--- a/chrome/browser/views/tabs/tab_2.h
+++ b/chrome/browser/views/tabs/tab_2.h
@@ -127,7 +127,7 @@ class Tab2 : public views::View,
};
// views::ButtonListener overrides:
- virtual void ButtonPressed(views::Button* sender);
+ virtual void ButtonPressed(views::Button* sender, const views::Event& event);
// Overridden from views::View:
virtual void Layout();
diff --git a/chrome/browser/views/tabs/tab_renderer.h b/chrome/browser/views/tabs/tab_renderer.h
index 8b2cbb8..1f91dd3 100644
--- a/chrome/browser/views/tabs/tab_renderer.h
+++ b/chrome/browser/views/tabs/tab_renderer.h
@@ -94,7 +94,8 @@ class TabRenderer : public views::View,
std::wstring GetTitle() const;
// views::ButtonListener overrides:
- virtual void ButtonPressed(views::Button* sender) {}
+ virtual void ButtonPressed(views::Button* sender,
+ const views::Event& event) {}
private:
// Overridden from views::View:
diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc
index 9bfb84b..3ff6d45 100644
--- a/chrome/browser/views/tabs/tab_strip.cc
+++ b/chrome/browser/views/tabs/tab_strip.cc
@@ -970,7 +970,7 @@ bool TabStrip::HasAvailableDragActions() const {
///////////////////////////////////////////////////////////////////////////////
// TabStrip, views::BaseButton::ButtonListener implementation:
-void TabStrip::ButtonPressed(views::Button* sender) {
+void TabStrip::ButtonPressed(views::Button* sender, const views::Event& event) {
if (sender == newtab_button_) {
UserMetrics::RecordAction(L"NewTab_Button", model_->profile());
model_->delegate()->AddBlankTab(true);
diff --git a/chrome/browser/views/tabs/tab_strip.h b/chrome/browser/views/tabs/tab_strip.h
index 08ad39b..d598a2c 100644
--- a/chrome/browser/views/tabs/tab_strip.h
+++ b/chrome/browser/views/tabs/tab_strip.h
@@ -121,7 +121,7 @@ class TabStrip : public views::View,
virtual bool HasAvailableDragActions() const;
// views::ButtonListener implementation:
- virtual void ButtonPressed(views::Button* sender);
+ virtual void ButtonPressed(views::Button* sender, const views::Event& event);
// MessageLoop::Observer implementation:
#if defined(OS_WIN)