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

Side by Side Diff: content/browser/renderer_host/input/mock_input_router_client.h

Issue 1861733002: Add touch drag UMA latency metric. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually fix tests. Created 4 years, 8 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 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "content/browser/renderer_host/input/input_router_client.h" 11 #include "content/browser/renderer_host/input/input_router_client.h"
12 #include "content/common/input/did_overscroll_params.h" 12 #include "content/common/input/did_overscroll_params.h"
13 #include "content/common/input/input_event.h" 13 #include "content/common/input/input_event.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class InputRouter; 17 class InputRouter;
18 18
19 class MockInputRouterClient : public InputRouterClient { 19 class MockInputRouterClient : public InputRouterClient {
20 public: 20 public:
21 MockInputRouterClient(); 21 MockInputRouterClient();
22 ~MockInputRouterClient() override; 22 ~MockInputRouterClient() override;
23 23
24 // InputRouterClient 24 // InputRouterClient
25 InputEventAckState FilterInputEvent( 25 InputEventAckState FilterInputEvent(
26 const blink::WebInputEvent& input_event, 26 const blink::WebInputEvent& input_event,
27 const ui::LatencyInfo& latency_info) override; 27 const ui::LatencyInfo& latency_info) override;
28 void OnForwardEventToRenderer(const blink::WebInputEvent& input_event,
29 ui::LatencyInfo* latency_info) override;
28 void IncrementInFlightEventCount() override; 30 void IncrementInFlightEventCount() override;
29 void DecrementInFlightEventCount() override; 31 void DecrementInFlightEventCount() override;
30 void OnHasTouchEventHandlers(bool has_handlers) override; 32 void OnHasTouchEventHandlers(bool has_handlers) override;
31 void DidFlush() override; 33 void DidFlush() override;
32 void DidOverscroll(const DidOverscrollParams& params) override; 34 void DidOverscroll(const DidOverscrollParams& params) override;
33 void DidStopFlinging() override; 35 void DidStopFlinging() override;
34 36
35 bool GetAndResetFilterEventCalled(); 37 bool GetAndResetFilterEventCalled();
36 size_t GetAndResetDidFlushCount(); 38 size_t GetAndResetDidFlushCount();
37 DidOverscrollParams GetAndResetOverscroll(); 39 DidOverscrollParams GetAndResetOverscroll();
(...skipping 27 matching lines...) Expand all
65 scoped_ptr<InputEvent> last_filter_event_; 67 scoped_ptr<InputEvent> last_filter_event_;
66 68
67 size_t did_flush_called_count_; 69 size_t did_flush_called_count_;
68 70
69 DidOverscrollParams overscroll_; 71 DidOverscrollParams overscroll_;
70 }; 72 };
71 73
72 } // namespace content 74 } // namespace content
73 75
74 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_ 76 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_MOCK_INPUT_ROUTER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698