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

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

Issue 15002007: Delegate root layer scroll offset to android_webview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase on top of Jared's CL 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 // The handler could be gone by this point if the compositor has shut down. 78 // The handler could be gone by this point if the compositor has shut down.
79 if (!input_handler) 79 if (!input_handler)
80 return; 80 return;
81 81
82 // The same handler may be registered for a route multiple times. 82 // The same handler may be registered for a route multiple times.
83 if (input_handlers_.count(routing_id) != 0) 83 if (input_handlers_.count(routing_id) != 0)
84 return; 84 return;
85 85
86 TRACE_EVENT0("InputHandlerManager::AddInputHandler", "AddingRoute"); 86 TRACE_EVENT0("InputHandlerManager::AddInputHandler", "AddingRoute");
87 client_->DidAddInputHandler(routing_id); 87 client_->DidAddInputHandler(routing_id, input_handler);
88 input_handlers_[routing_id] = 88 input_handlers_[routing_id] =
89 make_scoped_refptr(new InputHandlerWrapper(this, 89 make_scoped_refptr(new InputHandlerWrapper(this,
90 routing_id, main_loop, input_handler, render_view_impl)); 90 routing_id, main_loop, input_handler, render_view_impl));
91 } 91 }
92 92
93 void InputHandlerManager::RemoveInputHandler(int routing_id) { 93 void InputHandlerManager::RemoveInputHandler(int routing_id) {
94 DCHECK(message_loop_proxy_->BelongsToCurrentThread()); 94 DCHECK(message_loop_proxy_->BelongsToCurrentThread());
95 95
96 TRACE_EVENT0("InputHandlerManager::RemoveInputHandler", "RemovingRoute"); 96 TRACE_EVENT0("InputHandlerManager::RemoveInputHandler", "RemovingRoute");
97 97
(...skipping 12 matching lines...) Expand all
110 "NoInputHandlerFound"); 110 "NoInputHandlerFound");
111 // Oops, we no longer have an interested input handler.. 111 // Oops, we no longer have an interested input handler..
112 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 112 return INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
113 } 113 }
114 114
115 return InputEventDispositionToAck( 115 return InputEventDispositionToAck(
116 it->second->input_handler_proxy()->HandleInputEvent(input_event)); 116 it->second->input_handler_proxy()->HandleInputEvent(input_event));
117 } 117 }
118 118
119 } // namespace content 119 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698