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

Unified Diff: chrome/browser/ui/views/frame/browser_root_view.cc

Issue 285503002: Do not cycle through tabs if the user uses the scroll wheel while hovering over the window border (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_root_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_root_view.cc b/chrome/browser/ui/views/frame/browser_root_view.cc
index 1c6563d11371a58a1a1fa8a2efed7fb25ae6640c..46c355b401337aa775eff23196794053b94a7bbc 100644
--- a/chrome/browser/ui/views/frame/browser_root_view.cc
+++ b/chrome/browser/ui/views/frame/browser_root_view.cc
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/views/touch_uma/touch_uma.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/os_exchange_data.h"
+#include "ui/base/hit_test.h"
// static
const char BrowserRootView::kViewClassName[] =
@@ -124,9 +125,11 @@ bool BrowserRootView::OnMouseWheel(const ui::MouseWheelEvent& event) {
// Switch to the left/right tab if the wheel-scroll happens over the
// tabstrip, or the empty space beside the tabstrip.
views::View* hit_view = GetEventHandlerForPoint(event.location());
- views::NonClientView* non_client = GetWidget()->non_client_view();
+ int hittest =
+ GetWidget()->non_client_view()->NonClientHitTest(event.location());
if (tabstrip()->Contains(hit_view) ||
- hit_view == non_client->frame_view()) {
+ hittest == HTCAPTION ||
+ hittest == HTTOP) {
int scroll_offset = abs(event.y_offset()) > abs(event.x_offset()) ?
event.y_offset() : -event.x_offset();
Browser* browser = browser_view_->browser();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698