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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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 (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 "content/renderer/gpu/compositor_thread.h" 5 #include "content/renderer/gpu/compositor_thread.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "content/renderer/gpu/input_event_filter.h" 9 #include "content/renderer/gpu/input_event_filter.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebActiveWheelFlingPa rameters.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebActiveWheelFlingPa rameters.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); 81 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper);
82 }; 82 };
83 83
84 //------------------------------------------------------------------------------ 84 //------------------------------------------------------------------------------
85 85
86 CompositorThread::CompositorThread(IPC::Listener* main_listener) 86 CompositorThread::CompositorThread(IPC::Listener* main_listener)
87 : thread_("Compositor") { 87 : thread_("Compositor") {
88 filter_ = 88 filter_ =
89 new InputEventFilter(main_listener, 89 new InputEventFilter(main_listener,
90 thread_.message_loop()->message_loop_proxy(), 90 thread_.message_loop()->message_loop_proxy().get(),
91 base::Bind(&CompositorThread::HandleInputEvent, 91 base::Bind(&CompositorThread::HandleInputEvent,
92 base::Unretained(this))); 92 base::Unretained(this)));
93 } 93 }
94 94
95 CompositorThread::~CompositorThread() { 95 CompositorThread::~CompositorThread() {
96 } 96 }
97 97
98 IPC::ChannelProxy::MessageFilter* CompositorThread::GetMessageFilter() const { 98 IPC::ChannelProxy::MessageFilter* CompositorThread::GetMessageFilter() const {
99 return filter_; 99 return filter_.get();
100 } 100 }
101 101
102 void CompositorThread::AddInputHandler( 102 void CompositorThread::AddInputHandler(
103 int routing_id, int input_handler_id, 103 int routing_id, int input_handler_id,
104 const base::WeakPtr<RenderViewImpl>& render_view_impl) { 104 const base::WeakPtr<RenderViewImpl>& render_view_impl) {
105 DCHECK_NE(thread_.message_loop(), MessageLoop::current()); 105 DCHECK_NE(thread_.message_loop(), MessageLoop::current());
106 106
107 thread_.message_loop()->PostTask( 107 thread_.message_loop()->PostTask(
108 FROM_HERE, 108 FROM_HERE,
109 base::Bind(&CompositorThread::AddInputHandlerOnCompositorThread, 109 base::Bind(&CompositorThread::AddInputHandlerOnCompositorThread,
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 TRACE_EVENT0("CompositorThread::HandleInputEvent", "NoInputHandlerFound"); 160 TRACE_EVENT0("CompositorThread::HandleInputEvent", "NoInputHandlerFound");
161 // Oops, we no longer have an interested input handler.. 161 // Oops, we no longer have an interested input handler..
162 filter_->DidNotHandleInputEvent(true); 162 filter_->DidNotHandleInputEvent(true);
163 return; 163 return;
164 } 164 }
165 165
166 it->second->input_handler()->handleInputEvent(*input_event); 166 it->second->input_handler()->handleInputEvent(*input_event);
167 } 167 }
168 168
169 } // namespace content 169 } // namespace content
OLDNEW
« no previous file with comments | « content/plugin/plugin_channel.cc ('k') | content/renderer/media/mock_media_stream_dependency_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698