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

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

Issue 1532053002: use variadic macros/templates in IPC message implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ipc_fuzzer build again Created 4 years, 11 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 #include "content/renderer/input/input_event_filter.h" 5 #include "content/renderer/input/input_event_filter.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/location.h" 11 #include "base/location.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
15 #include "content/common/input/did_overscroll_params.h" 15 #include "content/common/input/did_overscroll_params.h"
16 #include "content/common/input/web_input_event_traits.h" 16 #include "content/common/input/web_input_event_traits.h"
17 #include "content/common/input_messages.h" 17 #include "content/common/input_messages.h"
18 #include "content/common/view_messages.h" 18 #include "content/common/view_messages.h"
19 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
20 #include "ipc/ipc_listener.h" 20 #include "ipc/ipc_listener.h"
21 #include "ipc/ipc_sender.h" 21 #include "ipc/ipc_sender.h"
22 #include "ui/events/blink/synchronous_input_handler_proxy.h" 22 #include "ui/events/blink/synchronous_input_handler_proxy.h"
23 #include "ui/gfx/geometry/vector2d_f.h" 23 #include "ui/gfx/geometry/vector2d_f.h"
24 24
25 using blink::WebInputEvent; 25 using blink::WebInputEvent;
26 26
27 #include "ipc/ipc_message_null_macros.h" 27 #include "ipc/ipc_message_null_macros.h"
28 #undef IPC_MESSAGE_DECL 28 #undef IPC_MESSAGE_DECL
29 #define IPC_MESSAGE_DECL(kind, type, name, in, out, ilist, olist) \ 29 #define IPC_MESSAGE_DECL(name, ...) \
vmpstr 2016/02/04 23:43:27 Where is this used? I tried to see if you updated
mdempsky 2016/02/05 00:32:32 It's used indirectly via the #include "content/com
30 case name::ID: return #name; 30 case name::ID: \
31 return #name;
31 32
32 const char* GetInputMessageTypeName(const IPC::Message& message) { 33 const char* GetInputMessageTypeName(const IPC::Message& message) {
33 switch (message.type()) { 34 switch (message.type()) {
34 #include "content/common/input_messages.h" 35 #include "content/common/input_messages.h"
35 default: 36 default:
36 NOTREACHED() << "Invalid message type: " << message.type(); 37 NOTREACHED() << "Invalid message type: " << message.type();
37 break; 38 break;
38 }; 39 };
39 return "NonInputMsgType"; 40 return "NonInputMsgType";
40 } 41 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 void InputEventFilter::SendMessageOnIOThread(scoped_ptr<IPC::Message> message) { 198 void InputEventFilter::SendMessageOnIOThread(scoped_ptr<IPC::Message> message) {
198 DCHECK(io_task_runner_->BelongsToCurrentThread()); 199 DCHECK(io_task_runner_->BelongsToCurrentThread());
199 200
200 if (!sender_) 201 if (!sender_)
201 return; // Filter was removed. 202 return; // Filter was removed.
202 203
203 sender_->Send(message.release()); 204 sender_->Send(message.release());
204 } 205 }
205 206
206 } // namespace content 207 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698