summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/dragged_tab_controller.h
diff options
context:
space:
mode:
authorsky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 19:00:57 +0000
committersky@google.com <sky@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-12 19:00:57 +0000
commite3740143c28c371adf5b6669d45176965e186052 (patch)
tree12407f902ac6c59a2f1e237694e8422c02a31a98 /chrome/browser/views/tabs/dragged_tab_controller.h
parent3c6f71f746758bc311a87bc573a9575c1f9d5123 (diff)
downloadchromium_src-e3740143c28c371adf5b6669d45176965e186052.zip
chromium_src-e3740143c28c371adf5b6669d45176965e186052.tar.gz
chromium_src-e3740143c28c371adf5b6669d45176965e186052.tar.bz2
During tab dragging if you hover over a browser window we now move it
to front after a delay. Also made docking to another window bring the other window to front. BUG=2038 TEST=Create two window with two tabs each. Drag a tab from one window onto the other window (not the tab area), hold it for a second and make sure the other window comes to front. Review URL: http://codereview.chromium.org/14057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/dragged_tab_controller.h')
-rw-r--r--chrome/browser/views/tabs/dragged_tab_controller.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/views/tabs/dragged_tab_controller.h b/chrome/browser/views/tabs/dragged_tab_controller.h
index 0363d93..8141c67 100644
--- a/chrome/browser/views/tabs/dragged_tab_controller.h
+++ b/chrome/browser/views/tabs/dragged_tab_controller.h
@@ -7,6 +7,7 @@
#include "base/gfx/rect.h"
#include "base/message_loop.h"
+#include "base/timer.h"
#include "chrome/browser/dock_info.h"
#include "chrome/browser/tab_contents_delegate.h"
#include "chrome/browser/tabs/tab_strip_model.h"
@@ -225,6 +226,8 @@ class DraggedTabController : public TabContentsDelegate,
void DockDisplayerDestroyed(DockDisplayer* controller);
+ void BringWindowUnderMouseToFront();
+
// The TabContents being dragged. This can get replaced during the drag if
// the associated NavigationController is navigated to a different
// TabContentsType.
@@ -296,6 +299,11 @@ class DraggedTabController : public TabContentsDelegate,
std::set<HWND> dock_windows_;
std::vector<DockDisplayer*> dock_controllers_;
+ // Timer used to bring the window under the cursor to front. If the user
+ // stops moving the mouse for a brief time over a browser window, it is
+ // brought to front.
+ base::OneShotTimer<DraggedTabController> bring_to_front_timer_;
+
DISALLOW_COPY_AND_ASSIGN(DraggedTabController);
};