OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history
_swiper.h" | 5 #import "chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history
_swiper.h" |
6 | 6 |
7 #import "base/mac/sdk_forward_declarations.h" | 7 #import "base/mac/sdk_forward_declarations.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_commands.h" | 9 #include "chrome/browser/ui/browser_commands.h" |
10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
11 #import "chrome/browser/ui/cocoa/history_overlay_controller.h" | 11 #import "chrome/browser/ui/cocoa/history_overlay_controller.h" |
12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
13 #include "third_party/WebKit/public/platform/WebGestureEvent.h" | 13 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
| 14 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" |
14 | 15 |
15 namespace { | 16 namespace { |
16 // The horizontal distance required to cause the browser to perform a history | 17 // The horizontal distance required to cause the browser to perform a history |
17 // navigation. | 18 // navigation. |
18 const CGFloat kHistorySwipeThreshold = 0.08; | 19 const CGFloat kHistorySwipeThreshold = 0.08; |
19 | 20 |
20 // The horizontal distance required for this class to start consuming events, | 21 // The horizontal distance required for this class to start consuming events, |
21 // which stops the events from reaching the renderer. | 22 // which stops the events from reaching the renderer. |
22 const CGFloat kConsumeEventThreshold = 0.01; | 23 const CGFloat kConsumeEventThreshold = 0.01; |
23 | 24 |
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 } | 584 } |
584 } | 585 } |
585 | 586 |
586 @end | 587 @end |
587 | 588 |
588 @implementation HistorySwiper (PrivateExposedForTesting) | 589 @implementation HistorySwiper (PrivateExposedForTesting) |
589 + (void)resetMagicMouseState { | 590 + (void)resetMagicMouseState { |
590 forceMagicMouse = NO; | 591 forceMagicMouse = NO; |
591 } | 592 } |
592 @end | 593 @end |
OLD | NEW |