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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1017473002: [Merge] Make mouse buttons 8 - 11 navigate forward and back in history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2311
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 case WM_NCXBUTTONDBLCLK: 257 case WM_NCXBUTTONDBLCLK:
258 return false; 258 return false;
259 default: 259 default:
260 break; 260 break;
261 } 261 }
262 #elif defined(USE_X11) 262 #elif defined(USE_X11)
263 // Renderer only supports standard mouse buttons, so ignore programmable 263 // Renderer only supports standard mouse buttons, so ignore programmable
264 // buttons. 264 // buttons.
265 switch (event->type()) { 265 switch (event->type()) {
266 case ui::ET_MOUSE_PRESSED: 266 case ui::ET_MOUSE_PRESSED:
267 case ui::ET_MOUSE_RELEASED: 267 case ui::ET_MOUSE_RELEASED: {
268 return event->IsAnyButton(); 268 const int kAllowedButtons = ui::EF_LEFT_MOUSE_BUTTON |
269 ui::EF_MIDDLE_MOUSE_BUTTON |
270 ui::EF_RIGHT_MOUSE_BUTTON;
271 return (event->flags() & kAllowedButtons) != 0;
272 }
269 default: 273 default:
270 break; 274 break;
271 } 275 }
272 #endif 276 #endif
273 return true; 277 return true;
274 } 278 }
275 279
276 // We don't mark these as handled so that they're sent back to the 280 // We don't mark these as handled so that they're sent back to the
277 // DefWindowProc so it can generate WM_APPCOMMAND as necessary. 281 // DefWindowProc so it can generate WM_APPCOMMAND as necessary.
278 bool IsXButtonUpEvent(const ui::MouseEvent* event) { 282 bool IsXButtonUpEvent(const ui::MouseEvent* event) {
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 2683
2680 //////////////////////////////////////////////////////////////////////////////// 2684 ////////////////////////////////////////////////////////////////////////////////
2681 // RenderWidgetHostViewBase, public: 2685 // RenderWidgetHostViewBase, public:
2682 2686
2683 // static 2687 // static
2684 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { 2688 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) {
2685 GetScreenInfoForWindow(results, NULL); 2689 GetScreenInfoForWindow(results, NULL);
2686 } 2690 }
2687 2691
2688 } // namespace content 2692 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | ui/aura/window_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698