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

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

Issue 16294003: Update content/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/debug/trace_event.h" 6 #include "base/debug/trace_event.h"
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/message_loop_proxy.h" 8 #include "base/message_loop_proxy.h"
9 #include "content/common/input_messages.h" 9 #include "content/common/input_messages.h"
10 #include "content/renderer/gpu/input_event_filter.h" 10 #include "content/renderer/gpu/input_event_filter.h"
11 11
12 using WebKit::WebInputEvent; 12 using WebKit::WebInputEvent;
13 13
14 namespace content { 14 namespace content {
15 15
16 InputEventFilter::InputEventFilter( 16 InputEventFilter::InputEventFilter(
17 IPC::Listener* main_listener, 17 IPC::Listener* main_listener,
18 const scoped_refptr<base::MessageLoopProxy>& target_loop, 18 const scoped_refptr<base::MessageLoopProxy>& target_loop,
19 const Handler& handler) 19 const Handler& handler)
20 : main_loop_(base::MessageLoopProxy::current()), 20 : main_loop_(base::MessageLoopProxy::current()),
21 main_listener_(main_listener), 21 main_listener_(main_listener),
22 sender_(NULL), 22 sender_(NULL),
23 target_loop_(target_loop), 23 target_loop_(target_loop),
24 handler_(handler) { 24 handler_(handler) {
25 DCHECK(target_loop_); 25 DCHECK(target_loop_.get());
26 DCHECK(!handler_.is_null()); 26 DCHECK(!handler_.is_null());
27 } 27 }
28 28
29 void InputEventFilter::AddRoute(int routing_id) { 29 void InputEventFilter::AddRoute(int routing_id) {
30 base::AutoLock locked(routes_lock_); 30 base::AutoLock locked(routes_lock_);
31 routes_.insert(routing_id); 31 routes_.insert(routing_id);
32 } 32 }
33 33
34 void InputEventFilter::RemoveRoute(int routing_id) { 34 void InputEventFilter::RemoveRoute(int routing_id) {
35 base::AutoLock locked(routes_lock_); 35 base::AutoLock locked(routes_lock_);
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 if (!sender_) 159 if (!sender_)
160 return; // Filter was removed. 160 return; // Filter was removed.
161 161
162 sender_->Send( 162 sender_->Send(
163 new InputHostMsg_HandleInputEvent_ACK( 163 new InputHostMsg_HandleInputEvent_ACK(
164 routing_id, event_type, ack_result)); 164 routing_id, event_type, ack_result));
165 } 165 }
166 166
167 } // namespace content 167 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/compositor_output_surface.cc ('k') | content/renderer/gpu/input_event_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698