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

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

Issue 281723010: Bundle DidOverscrollParams with the InputEventAck (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 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
« no previous file with comments | « content/content_common.gypi ('k') | content/renderer/input/input_event_filter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE; 63 virtual void OnFilterAdded(IPC::Channel* channel) OVERRIDE;
64 virtual void OnFilterRemoved() OVERRIDE; 64 virtual void OnFilterRemoved() OVERRIDE;
65 virtual void OnChannelClosing() OVERRIDE; 65 virtual void OnChannelClosing() OVERRIDE;
66 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 66 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
67 67
68 private: 68 private:
69 virtual ~InputEventFilter(); 69 virtual ~InputEventFilter();
70 70
71 void ForwardToMainListener(const IPC::Message& message); 71 void ForwardToMainListener(const IPC::Message& message);
72 void ForwardToHandler(const IPC::Message& message); 72 void ForwardToHandler(const IPC::Message& message);
73 void SendACK(blink::WebInputEvent::Type type, 73 void SendMessage(scoped_ptr<IPC::Message> message);
74 InputEventAckState ack_result, 74 void SendMessageOnIOThread(scoped_ptr<IPC::Message> message);
75 const ui::LatencyInfo& latency_info,
76 int routing_id);
77 void SendMessage(const IPC::Message& message);
78 void SendMessageOnIOThread(const IPC::Message& message);
79 75
80 scoped_refptr<base::MessageLoopProxy> main_loop_; 76 scoped_refptr<base::MessageLoopProxy> main_loop_;
81 IPC::Listener* main_listener_; 77 IPC::Listener* main_listener_;
82 78
83 // The sender_ only gets invoked on the thread corresponding to io_loop_. 79 // The sender_ only gets invoked on the thread corresponding to io_loop_.
84 scoped_refptr<base::MessageLoopProxy> io_loop_; 80 scoped_refptr<base::MessageLoopProxy> io_loop_;
85 IPC::Sender* sender_; 81 IPC::Sender* sender_;
86 82
87 // The handler_ only gets Run on the thread corresponding to target_loop_. 83 // The handler_ only gets Run on the thread corresponding to target_loop_.
88 scoped_refptr<base::MessageLoopProxy> target_loop_; 84 scoped_refptr<base::MessageLoopProxy> target_loop_;
89 Handler handler_; 85 Handler handler_;
90 86
91 // Protects access to routes_. 87 // Protects access to routes_.
92 base::Lock routes_lock_; 88 base::Lock routes_lock_;
93 89
94 // Indicates the routing_ids for which input events should be filtered. 90 // Indicates the routing_ids for which input events should be filtered.
95 std::set<int> routes_; 91 std::set<int> routes_;
96 92
97 // Specifies whether overscroll notifications are forwarded to the host. 93 // Specifies whether overscroll notifications are forwarded to the host.
98 bool overscroll_notifications_enabled_; 94 bool overscroll_notifications_enabled_;
95
96 // Used to intercept overscroll notifications while an event is being
97 // dispatched. If the event causes overscroll, the overscroll metadata can be
98 // bundled in the event ack, saving an IPC. Note that we must continue
99 // supporting overscroll IPC notifications due to fling animation updates.
100 scoped_ptr<DidOverscrollParams>* current_overscroll_params_;
99 }; 101 };
100 102
101 } // namespace content 103 } // namespace content
102 104
103 #endif // CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_ 105 #endif // CONTENT_RENDERER_INPUT_INPUT_EVENT_FILTER_H_
OLDNEW
« no previous file with comments | « content/content_common.gypi ('k') | content/renderer/input/input_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698