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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm

Issue 2227803003: Plumb phase/momentum for WheelEvent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Non-Mac compile. Created 4 years, 4 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
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_mac.h" 5 #include "content/browser/renderer_host/render_widget_host_view_mac.h"
6 6
7 #include <Cocoa/Cocoa.h> 7 #include <Cocoa/Cocoa.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <tuple> 10 #include <tuple>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 consumed:(BOOL)consumed { 89 consumed:(BOOL)consumed {
90 if (!consumed && event.type == blink::WebInputEvent::GestureScrollUpdate) 90 if (!consumed && event.type == blink::WebInputEvent::GestureScrollUpdate)
91 unhandledWheelEventReceived_ = true; 91 unhandledWheelEventReceived_ = true;
92 } 92 }
93 - (void)touchesBeganWithEvent:(NSEvent*)event {} 93 - (void)touchesBeganWithEvent:(NSEvent*)event {}
94 - (void)touchesMovedWithEvent:(NSEvent*)event {} 94 - (void)touchesMovedWithEvent:(NSEvent*)event {}
95 - (void)touchesCancelledWithEvent:(NSEvent*)event {} 95 - (void)touchesCancelledWithEvent:(NSEvent*)event {}
96 - (void)touchesEndedWithEvent:(NSEvent*)event {} 96 - (void)touchesEndedWithEvent:(NSEvent*)event {}
97 - (void)beginGestureWithEvent:(NSEvent*)event {} 97 - (void)beginGestureWithEvent:(NSEvent*)event {}
98 - (void)endGestureWithEvent:(NSEvent*)event {} 98 - (void)endGestureWithEvent:(NSEvent*)event {}
99 - (BOOL)canRubberbandLeft:(NSView*)view {
100 return true;
101 }
102 - (BOOL)canRubberbandRight:(NSView*)view {
103 return true;
104 }
105 99
106 @end 100 @end
107 101
108 namespace content { 102 namespace content {
109 103
110 namespace { 104 namespace {
111 105
112 std::string GetInputMessageTypes(MockRenderProcessHost* process) { 106 std::string GetInputMessageTypes(MockRenderProcessHost* process) {
113 std::string result; 107 std::string result;
114 for (size_t i = 0; i < process->sink().message_count(); ++i) { 108 for (size_t i = 0; i < process->sink().message_count(); ++i) {
(...skipping 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 // Verify that Event.Latency.OS.MOUSE_WHEEL histogram is computed properly. 1241 // Verify that Event.Latency.OS.MOUSE_WHEEL histogram is computed properly.
1248 NSEvent* wheelEvent = MockScrollWheelEventWithPhase(@selector(phaseBegan),3); 1242 NSEvent* wheelEvent = MockScrollWheelEventWithPhase(@selector(phaseBegan),3);
1249 [view->cocoa_view() scrollWheel:wheelEvent]; 1243 [view->cocoa_view() scrollWheel:wheelEvent];
1250 histogram_tester.ExpectTotalCount("Event.Latency.OS.MOUSE_WHEEL", 1); 1244 histogram_tester.ExpectTotalCount("Event.Latency.OS.MOUSE_WHEEL", 1);
1251 1245
1252 // Clean up. 1246 // Clean up.
1253 host->ShutdownAndDestroyWidget(true); 1247 host->ShutdownAndDestroyWidget(true);
1254 } 1248 }
1255 1249
1256 } // namespace content 1250 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698