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

Unified Diff: chrome/browser/ui/views/download/download_shelf_view.cc

Issue 9309110: Refactored MouseWatcher to allow regions other than Views to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup Created 8 years, 10 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: chrome/browser/ui/views/download/download_shelf_view.cc
diff --git a/chrome/browser/ui/views/download/download_shelf_view.cc b/chrome/browser/ui/views/download/download_shelf_view.cc
index 89495c1c99a09252736ea022a42c95b683fa1813..37fd4d49a568ee6b290aaa0798d4f595d8588d0f 100644
--- a/chrome/browser/ui/views/download/download_shelf_view.cc
+++ b/chrome/browser/ui/views/download/download_shelf_view.cc
@@ -30,6 +30,7 @@
#include "ui/views/controls/button/image_button.h"
#include "ui/views/controls/image_view.h"
#include "ui/views/controls/link.h"
+#include "ui/views/mouse_watcher_view_host.h"
// Max number of download views we'll contain. Any time a view is added and
// we already have this many download views, one is removed.
@@ -93,7 +94,8 @@ DownloadShelfView::DownloadShelfView(Browser* browser, BrowserView* parent)
parent_(parent),
auto_closed_(true),
ALLOW_THIS_IN_INITIALIZER_LIST(
- mouse_watcher_(this, this, gfx::Insets())) {
+ mouse_watcher_(new views::MouseWatcherViewHost(this, gfx::Insets()),
+ this)) {
mouse_watcher_.set_notify_on_exit_time_ms(kNotifyOnExitTimeMS);
set_id(VIEW_ID_DOWNLOAD_SHELF);
parent->AddChildView(this);
@@ -122,7 +124,7 @@ void DownloadShelfView::DoAddDownload(BaseDownloadItemModel* download_model) {
AddDownloadView(view);
}
-void DownloadShelfView::MouseMovedOutOfView() {
+void DownloadShelfView::MouseMovedOutOfHost() {
Close();
}

Powered by Google App Engine
This is Rietveld 408576698