| OLD | NEW | 
|    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  Loading... | 
|   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  Loading... | 
|   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 | 
| OLD | NEW |