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

Side by Side Diff: blimp/client/input/blimp_input_handler_wrapper.cc

Issue 1591083002: blimp: Fix input events sent from the client to the engine (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "blimp/client/input/blimp_input_handler_wrapper.h" 5 #include "blimp/client/input/blimp_input_handler_wrapper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "blimp/client/input/blimp_input_manager.h" 10 #include "blimp/client/input/blimp_input_manager.h"
(...skipping 26 matching lines...) Expand all
37 scoped_ptr<blink::WebInputEvent> input_event) { 37 scoped_ptr<blink::WebInputEvent> input_event) {
38 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 38 DCHECK(compositor_thread_checker_.CalledOnValidThread());
39 39
40 // We might not have the input handler proxy anymore. 40 // We might not have the input handler proxy anymore.
41 if (!input_handler_proxy_) 41 if (!input_handler_proxy_)
42 return; 42 return;
43 43
44 ui::InputHandlerProxy::EventDisposition disposition = 44 ui::InputHandlerProxy::EventDisposition disposition =
45 input_handler_proxy_->HandleInputEvent(*input_event); 45 input_handler_proxy_->HandleInputEvent(*input_event);
46 46
47 bool consumed = disposition == ui::InputHandlerProxy::DID_NOT_HANDLE; 47 bool consumed;
Wez 2016/01/15 20:58:18 Initialize consumed to false here!
Khushal 2016/01/15 21:03:21 Done.
48
49 switch (disposition) {
50 case ui::InputHandlerProxy::EventDisposition::DID_HANDLE:
51 case ui::InputHandlerProxy::EventDisposition::DROP_EVENT:
52 consumed = true;
53 break;
54 case ui::InputHandlerProxy::EventDisposition::DID_NOT_HANDLE:
55 consumed = false;
Wez 2016/01/15 20:58:18 nit: This case should have a break; even though it
Khushal 2016/01/15 21:03:21 Done.
56 }
48 57
49 main_task_runner_->PostTask( 58 main_task_runner_->PostTask(
50 FROM_HERE, 59 FROM_HERE,
51 base::Bind(&BlimpInputManager::DidHandleWebInputEvent, 60 base::Bind(&BlimpInputManager::DidHandleWebInputEvent,
52 input_manager_weak_ptr_, 61 input_manager_weak_ptr_,
53 base::Passed(&input_event), consumed)); 62 base::Passed(&input_event), consumed));
54 } 63 }
55 64
56 void BlimpInputHandlerWrapper::WillShutdown() { 65 void BlimpInputHandlerWrapper::WillShutdown() {
57 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 66 DCHECK(compositor_thread_checker_.CalledOnValidThread());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void BlimpInputHandlerWrapper::DidStopFlinging() { 100 void BlimpInputHandlerWrapper::DidStopFlinging() {
92 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 101 DCHECK(compositor_thread_checker_.CalledOnValidThread());
93 } 102 }
94 103
95 void BlimpInputHandlerWrapper::DidAnimateForInput() { 104 void BlimpInputHandlerWrapper::DidAnimateForInput() {
96 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 105 DCHECK(compositor_thread_checker_.CalledOnValidThread());
97 } 106 }
98 107
99 } // namespace client 108 } // namespace client
100 } // namespace blimp 109 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698