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

Side by Side Diff: content/renderer/input/input_event_filter.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: Refactor and rename 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 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_RENDERER_INPUT_INPUT_EVENT_FILTER_H_ 5 #ifndef CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_
6 #define CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_ 6 #define CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <set> 9 #include <set>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 void OnFilterRemoved() override; 74 void OnFilterRemoved() override;
75 void OnChannelClosing() override; 75 void OnChannelClosing() override;
76 bool OnMessageReceived(const IPC::Message& message) override; 76 bool OnMessageReceived(const IPC::Message& message) override;
77 77
78 // MainThreadEventQueueClient methods: 78 // MainThreadEventQueueClient methods:
79 void SendEventToMainThread(int routing_id, 79 void SendEventToMainThread(int routing_id,
80 const blink::WebInputEvent* event, 80 const blink::WebInputEvent* event,
81 const ui::LatencyInfo& latency, 81 const ui::LatencyInfo& latency,
82 InputEventDispatchType dispatch_type) override; 82 InputEventDispatchType dispatch_type) override;
83 83
84 // Whether the fling animation is happening right now.
85 void SetIsFlinging(bool is_flinging) override;
86
84 private: 87 private:
85 ~InputEventFilter() override; 88 ~InputEventFilter() override;
86 89
87 void ForwardToHandler(const IPC::Message& message); 90 void ForwardToHandler(const IPC::Message& message);
88 void SendMessage(std::unique_ptr<IPC::Message> message); 91 void SendMessage(std::unique_ptr<IPC::Message> message);
89 void SendMessageOnIOThread(std::unique_ptr<IPC::Message> message); 92 void SendMessageOnIOThread(std::unique_ptr<IPC::Message> message);
90 93
91 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 94 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
92 base::Callback<void(const IPC::Message&)> main_listener_; 95 base::Callback<void(const IPC::Message&)> main_listener_;
93 96
(...skipping 13 matching lines...) Expand all
107 110
108 using RouteQueueMap = 111 using RouteQueueMap =
109 std::unordered_map<int, std::unique_ptr<MainThreadEventQueue>>; 112 std::unordered_map<int, std::unique_ptr<MainThreadEventQueue>>;
110 RouteQueueMap route_queues_; 113 RouteQueueMap route_queues_;
111 114
112 // Used to intercept overscroll notifications while an event is being 115 // Used to intercept overscroll notifications while an event is being
113 // dispatched. If the event causes overscroll, the overscroll metadata can be 116 // dispatched. If the event causes overscroll, the overscroll metadata can be
114 // bundled in the event ack, saving an IPC. Note that we must continue 117 // bundled in the event ack, saving an IPC. Note that we must continue
115 // supporting overscroll IPC notifications due to fling animation updates. 118 // supporting overscroll IPC notifications due to fling animation updates.
116 std::unique_ptr<DidOverscrollParams>* current_overscroll_params_; 119 std::unique_ptr<DidOverscrollParams>* current_overscroll_params_;
120
121 bool is_flinging_;
117 }; 122 };
118 123
119 } // namespace content 124 } // namespace content
120 125
121 #endif // CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_ 126 #endif // CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698