| OLD | NEW |
| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 scoped_refptr<base::MessageLoopProxy> main_loop_; | 74 scoped_refptr<base::MessageLoopProxy> main_loop_; |
| 75 | 75 |
| 76 // Can only be accessed on the main thread. | 76 // Can only be accessed on the main thread. |
| 77 base::WeakPtr<RenderViewImpl> render_view_impl_; | 77 base::WeakPtr<RenderViewImpl> render_view_impl_; |
| 78 | 78 |
| 79 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); | 79 DISALLOW_COPY_AND_ASSIGN(InputHandlerWrapper); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 //------------------------------------------------------------------------------ | 82 //------------------------------------------------------------------------------ |
| 83 | 83 |
| 84 CompositorThread::CompositorThread(IPC::Channel::Listener* main_listener) | 84 CompositorThread::CompositorThread(IPC::Listener* main_listener) |
| 85 : thread_("Compositor") { | 85 : thread_("Compositor") { |
| 86 filter_ = | 86 filter_ = |
| 87 new InputEventFilter(main_listener, | 87 new InputEventFilter(main_listener, |
| 88 thread_.message_loop()->message_loop_proxy(), | 88 thread_.message_loop()->message_loop_proxy(), |
| 89 base::Bind(&CompositorThread::HandleInputEvent, | 89 base::Bind(&CompositorThread::HandleInputEvent, |
| 90 base::Unretained(this))); | 90 base::Unretained(this))); |
| 91 } | 91 } |
| 92 | 92 |
| 93 CompositorThread::~CompositorThread() { | 93 CompositorThread::~CompositorThread() { |
| 94 } | 94 } |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 InputHandlerMap::iterator it = input_handlers_.find(routing_id); | 156 InputHandlerMap::iterator it = input_handlers_.find(routing_id); |
| 157 if (it == input_handlers_.end()) { | 157 if (it == input_handlers_.end()) { |
| 158 TRACE_EVENT0("CompositorThread::HandleInputEvent", "NoInputHandlerFound"); | 158 TRACE_EVENT0("CompositorThread::HandleInputEvent", "NoInputHandlerFound"); |
| 159 // Oops, we no longer have an interested input handler.. | 159 // Oops, we no longer have an interested input handler.. |
| 160 filter_->DidNotHandleInputEvent(true); | 160 filter_->DidNotHandleInputEvent(true); |
| 161 return; | 161 return; |
| 162 } | 162 } |
| 163 | 163 |
| 164 it->second->input_handler()->handleInputEvent(*input_event); | 164 it->second->input_handler()->handleInputEvent(*input_event); |
| 165 } | 165 } |
| OLD | NEW |