summaryrefslogtreecommitdiffstats
path: root/views/mouse_watcher.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 17:17:51 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 17:17:51 +0000
commitee8f30e6d53fc657305af0bd074066f5bca1b63c (patch)
tree0a1779ae5d1bd83421d4cf0ccd55a09dff0a83df /views/mouse_watcher.h
parent45313cb9ff691d9e13d9cbb51d4128e12ad548cc (diff)
downloadchromium_src-ee8f30e6d53fc657305af0bd074066f5bca1b63c.zip
chromium_src-ee8f30e6d53fc657305af0bd074066f5bca1b63c.tar.gz
chromium_src-ee8f30e6d53fc657305af0bd074066f5bca1b63c.tar.bz2
Makes the download shelf auto-close after the user opens all downloads
and moves mouse off the shelf. BUG=27797 TEST=on windows download an item, open it, move the mouse off the download shelf and make sure it closes. Review URL: http://codereview.chromium.org/3177034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/mouse_watcher.h')
-rw-r--r--views/mouse_watcher.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/views/mouse_watcher.h b/views/mouse_watcher.h
index 7037487..d23483d 100644
--- a/views/mouse_watcher.h
+++ b/views/mouse_watcher.h
@@ -37,6 +37,10 @@ class MouseWatcher {
const gfx::Insets& hot_zone_insets);
~MouseWatcher();
+ // Sets the amount to delay before notifying the listener when the mouse exits
+ // the view by way of going to another window.
+ void set_notify_on_exit_time_ms(int time) { notify_on_exit_time_ms_ = time; }
+
// Starts watching mouse movements. When the mouse moves outside the bounds of
// the view the listener is notified. |Start| may be invoked any number of
// times. If the mouse moves outside the bounds of the view the listener is
@@ -56,7 +60,7 @@ class MouseWatcher {
void NotifyListener();
// View we're listening for events over.
- views::View* host_;
+ View* host_;
// Our listener.
MouseWatcherListener* listener_;
@@ -67,6 +71,9 @@ class MouseWatcher {
// Does the actual work of listening for mouse events.
scoped_ptr<Observer> observer_;
+ // See description above setter.
+ int notify_on_exit_time_ms_;
+
DISALLOW_COPY_AND_ASSIGN(MouseWatcher);
};