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

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: Addressed wez's comments. 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 = false;
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;
56 break;
57 }
48 58
49 main_task_runner_->PostTask( 59 main_task_runner_->PostTask(
50 FROM_HERE, 60 FROM_HERE,
51 base::Bind(&BlimpInputManager::DidHandleWebInputEvent, 61 base::Bind(&BlimpInputManager::DidHandleWebInputEvent,
52 input_manager_weak_ptr_, 62 input_manager_weak_ptr_,
53 base::Passed(&input_event), consumed)); 63 base::Passed(&input_event), consumed));
54 } 64 }
55 65
56 void BlimpInputHandlerWrapper::WillShutdown() { 66 void BlimpInputHandlerWrapper::WillShutdown() {
57 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 67 DCHECK(compositor_thread_checker_.CalledOnValidThread());
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 void BlimpInputHandlerWrapper::DidStopFlinging() { 101 void BlimpInputHandlerWrapper::DidStopFlinging() {
92 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 102 DCHECK(compositor_thread_checker_.CalledOnValidThread());
93 } 103 }
94 104
95 void BlimpInputHandlerWrapper::DidAnimateForInput() { 105 void BlimpInputHandlerWrapper::DidAnimateForInput() {
96 DCHECK(compositor_thread_checker_.CalledOnValidThread()); 106 DCHECK(compositor_thread_checker_.CalledOnValidThread());
97 } 107 }
98 108
99 } // namespace client 109 } // namespace client
100 } // namespace blimp 110 } // 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