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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 9309110: Refactored MouseWatcher to allow regions other than Views to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review nits 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
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.h ('k') | ui/views/mouse_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.cc
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 95bf7676a2854ab7c63267f2dd11a3b2eec9c5d9..87b7c6b540cef659ddccd1758fe92d355bf8a0e4 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -36,6 +36,7 @@
#include "ui/gfx/skbitmap_operations.h"
#include "ui/gfx/size.h"
#include "ui/views/controls/image_view.h"
+#include "ui/views/mouse_watcher_view_host.h"
#include "ui/views/widget/default_theme_provider.h"
#include "ui/views/widget/root_view.h"
#include "ui/views/widget/widget.h"
@@ -729,7 +730,7 @@ void TabStrip::ClickActiveTab(const BaseTab* tab) const {
controller()->ClickActiveTab(index);
}
-void TabStrip::MouseMovedOutOfView() {
+void TabStrip::MouseMovedOutOfHost() {
ResizeLayoutTabs();
}
@@ -1401,8 +1402,10 @@ void TabStrip::SetTabBoundsForDrag(const std::vector<gfx::Rect>& tab_bounds) {
void TabStrip::AddMessageLoopObserver() {
if (!mouse_watcher_.get()) {
mouse_watcher_.reset(
- new views::MouseWatcher(this, this,
- gfx::Insets(0, 0, kTabStripAnimationVSlop, 0)));
+ new views::MouseWatcher(
+ new views::MouseWatcherViewHost(
+ this, gfx::Insets(0, 0, kTabStripAnimationVSlop, 0)),
+ this));
}
mouse_watcher_->Start();
}
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.h ('k') | ui/views/mouse_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698