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

Side by Side Diff: content/renderer/input/main_thread_event_queue.h

Issue 1923973002: Add UMA metric for tracking listeners for blocking touch while fling is happening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync the fling states Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ 5 #ifndef CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_
6 #define CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ 6 #define CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/common/input/event_with_latency_info.h" 10 #include "content/common/input/event_with_latency_info.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 class CONTENT_EXPORT MainThreadEventQueue { 93 class CONTENT_EXPORT MainThreadEventQueue {
94 public: 94 public:
95 MainThreadEventQueue(int routing_id, MainThreadEventQueueClient* client); 95 MainThreadEventQueue(int routing_id, MainThreadEventQueueClient* client);
96 ~MainThreadEventQueue(); 96 ~MainThreadEventQueue();
97 97
98 // Called once the compositor has handled |event| and indicated that it is 98 // Called once the compositor has handled |event| and indicated that it is
99 // a non-blocking event to be queued to the main thread. 99 // a non-blocking event to be queued to the main thread.
100 bool HandleEvent(const blink::WebInputEvent* event, 100 bool HandleEvent(const blink::WebInputEvent* event,
101 const ui::LatencyInfo& latency, 101 const ui::LatencyInfo& latency,
102 InputEventDispatchType dispatch_type, 102 InputEventDispatchType dispatch_type,
103 InputEventAckState ack_result); 103 InputEventAckState ack_result,
104 bool is_flinging = false);
tdresser 2016/05/09 19:48:45 Can we plumb the information about whether a fling
lanwei 2016/05/12 11:50:36 Done.
104 105
105 // Call once the main thread has handled an outstanding |type| event 106 // Call once the main thread has handled an outstanding |type| event
106 // in flight. 107 // in flight.
107 void EventHandled(blink::WebInputEvent::Type type); 108 void EventHandled(blink::WebInputEvent::Type type);
108 109
109 private: 110 private:
110 friend class MainThreadEventQueueTest; 111 friend class MainThreadEventQueueTest;
111 int routing_id_; 112 int routing_id_;
112 MainThreadEventQueueClient* client_; 113 MainThreadEventQueueClient* client_;
113 WebInputEventQueue<PendingMouseWheelEvent> wheel_events_; 114 WebInputEventQueue<PendingMouseWheelEvent> wheel_events_;
114 WebInputEventQueue<PendingTouchEvent> touch_events_; 115 WebInputEventQueue<PendingTouchEvent> touch_events_;
115 116
116 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue); 117 DISALLOW_COPY_AND_ASSIGN(MainThreadEventQueue);
117 }; 118 };
118 119
119 } // namespace content 120 } // namespace content
120 121
121 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_ 122 #endif // CONTENT_RENDERER_INPUT_MAIN_THREAD_EVENT_QUEUE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698