summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-23 20:26:58 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-23 20:26:58 +0000
commit3de760388c0fd01fc9dc69f7c2cf780ce8421995 (patch)
tree0a1d139513cf86240c5c202c10d4c3c333cd040d /chrome/browser/gtk
parent3aa054ce8c48f06b32ea367bf79f42a70bfefa5f (diff)
downloadchromium_src-3de760388c0fd01fc9dc69f7c2cf780ce8421995.zip
chromium_src-3de760388c0fd01fc9dc69f7c2cf780ce8421995.tar.gz
chromium_src-3de760388c0fd01fc9dc69f7c2cf780ce8421995.tar.bz2
Revert 57094 - Making window.focus()/blur() work only when there is a user gesture.
Also making window.focus() select tab if it is not visible. The RenderViewHost now calls ActivateContent and the new DeactivateContent (instead of using the recently added TabContentsDelegate::Activate/Deactivate methods which have been removed). BUG=29643,52346 TEST=Create a page with buttons that call window.focus()/blur() directly and with a timeout. When called directly, the calls should succeed (the browser should be activated/deactivated). When called with a timeout, nothing should happen. Also test that a popup calling window.opener.focus() cause the opening tab to become selected when it is not the current tab. Review URL: http://codereview.chromium.org/3156016 TBR=jcivelli@chromium.org Review URL: http://codereview.chromium.org/3201008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57105 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc4
-rw-r--r--chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h1
2 files changed, 0 insertions, 5 deletions
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
index 551aeb8..64c314d 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.cc
@@ -146,10 +146,6 @@ void DraggedTabControllerGtk::ActivateContents(TabContents* contents) {
// Ignored.
}
-void DraggedTabControllerGtk::DeactivateContents(TabContents* contents) {
- // Ignored.
-}
-
void DraggedTabControllerGtk::LoadingStateChanged(TabContents* source) {
// TODO(jhawkins): It would be nice to respond to this message by changing the
// screen shot in the dragged tab.
diff --git a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h
index b8b8eb3..a9fba9d 100644
--- a/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h
+++ b/chrome/browser/gtk/tabs/dragged_tab_controller_gtk.h
@@ -82,7 +82,6 @@ class DraggedTabControllerGtk : public NotificationObserver,
const gfx::Rect& initial_pos,
bool user_gesture);
virtual void ActivateContents(TabContents* contents);
- virtual void DeactivateContents(TabContents* contents);
virtual void LoadingStateChanged(TabContents* source);
virtual void CloseContents(TabContents* source);
virtual void MoveContents(TabContents* source, const gfx::Rect& pos);