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

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

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code 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 "content/renderer/gpu/input_handler_manager.h" 5 #include "content/renderer/gpu/input_handler_manager.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 "cc/input/input_handler.h" 9 #include "cc/input/input_handler.h"
10 #include "content/renderer/gpu/input_event_filter.h" 10 #include "content/renderer/gpu/input_event_filter.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 void InputHandlerManager::AddInputHandlerOnCompositorThread( 53 void InputHandlerManager::AddInputHandlerOnCompositorThread(
54 int routing_id, 54 int routing_id,
55 const scoped_refptr<base::MessageLoopProxy>& main_loop, 55 const scoped_refptr<base::MessageLoopProxy>& main_loop,
56 const base::WeakPtr<cc::InputHandler>& input_handler, 56 const base::WeakPtr<cc::InputHandler>& input_handler,
57 const base::WeakPtr<RenderViewImpl>& render_view_impl) { 57 const base::WeakPtr<RenderViewImpl>& render_view_impl) {
58 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 58 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
59 59
60 // The handler could be gone by this point if the compositor has shut down. 60 // The handler could be gone by this point if the compositor has shut down.
61 if (!input_handler) 61 if (!input_handler.get())
62 return; 62 return;
63 63
64 // The same handler may be registered for a route multiple times. 64 // The same handler may be registered for a route multiple times.
65 if (input_handlers_.count(routing_id) != 0) 65 if (input_handlers_.count(routing_id) != 0)
66 return; 66 return;
67 67
68 TRACE_EVENT0("InputHandlerManager::AddInputHandler", "AddingRoute"); 68 TRACE_EVENT0("InputHandlerManager::AddInputHandler", "AddingRoute");
69 filter_->AddRoute(routing_id); 69 filter_->AddRoute(routing_id);
70 input_handlers_[routing_id] = 70 input_handlers_[routing_id] =
71 make_scoped_refptr(new InputHandlerWrapper(this, 71 make_scoped_refptr(new InputHandlerWrapper(this,
(...skipping 20 matching lines...) Expand all
92 "NoInputHandlerFound"); 92 "NoInputHandlerFound");
93 // Oops, we no longer have an interested input handler.. 93 // Oops, we no longer have an interested input handler..
94 filter_->DidNotHandleInputEvent(true); 94 filter_->DidNotHandleInputEvent(true);
95 return; 95 return;
96 } 96 }
97 97
98 it->second->input_handler_proxy()->HandleInputEvent(*input_event); 98 it->second->input_handler_proxy()->HandleInputEvent(*input_event);
99 } 99 }
100 100
101 } // namespace content 101 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_manager.h ('k') | content/renderer/media/media_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698