Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: views/mouse_watcher.h

Issue 3177034: Makes the download shelf auto-close after the user opens all downloads (Closed)
Patch Set: Have OnDownloadOpened invoked before opened to match old behavior Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: views/mouse_watcher.h
diff --git a/views/mouse_watcher.h b/views/mouse_watcher.h
index 70374878b059bc478228c1cd3cabcee18e9450fd..d23483d205de7050df381e7bb0270f0d94e2eb29 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);
};

Powered by Google App Engine
This is Rietveld 408576698