| 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 #ifndef BLIMP_CLIENT_INPUT_BLIMP_INPUT_MANAGER_H_ | 5 #ifndef BLIMP_CLIENT_INPUT_BLIMP_INPUT_MANAGER_H_ |
| 6 #define BLIMP_CLIENT_INPUT_BLIMP_INPUT_MANAGER_H_ | 6 #define BLIMP_CLIENT_INPUT_BLIMP_INPUT_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "blimp/client/input/blimp_input_handler_wrapper.h" | 12 #include "blimp/client/input/blimp_input_handler_wrapper.h" |
| 13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 14 #include "ui/events/gesture_detection/filtered_gesture_provider.h" | 14 #include "ui/events/gesture_detection/filtered_gesture_provider.h" |
| 15 #include "ui/events/gesture_detection/motion_event.h" | 15 #include "ui/events/gesture_detection/motion_event.h" |
| 16 | 16 |
| 17 namespace blimp { | 17 namespace blimp { |
| 18 namespace client { |
| 18 | 19 |
| 19 class BlimpInputManagerClient { | 20 class BlimpInputManagerClient { |
| 20 public: | 21 public: |
| 21 virtual void SendWebInputEvent( | 22 virtual void SendWebInputEvent( |
| 22 const blink::WebInputEvent& input_event) = 0; | 23 const blink::WebInputEvent& input_event) = 0; |
| 23 }; | 24 }; |
| 24 | 25 |
| 25 // The BlimpInputManager handles input events for a specific web widget. The | 26 // The BlimpInputManager handles input events for a specific web widget. The |
| 26 // class processes ui::events to generate web input events which are forwarded | 27 // class processes ui::events to generate web input events which are forwarded |
| 27 // to the compositor to be handled on the compositor thread. If the event can | 28 // to the compositor to be handled on the compositor thread. If the event can |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // read in ShutdownOnCompositorThread. | 95 // read in ShutdownOnCompositorThread. |
| 95 bool main_thread_blocked_; | 96 bool main_thread_blocked_; |
| 96 | 97 |
| 97 scoped_ptr<BlimpInputHandlerWrapper> input_handler_wrapper_; | 98 scoped_ptr<BlimpInputHandlerWrapper> input_handler_wrapper_; |
| 98 | 99 |
| 99 base::WeakPtrFactory<BlimpInputManager> weak_factory_; | 100 base::WeakPtrFactory<BlimpInputManager> weak_factory_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(BlimpInputManager); | 102 DISALLOW_COPY_AND_ASSIGN(BlimpInputManager); |
| 102 }; | 103 }; |
| 103 | 104 |
| 105 } // namespace client |
| 104 } // namespace blimp | 106 } // namespace blimp |
| 105 | 107 |
| 106 #endif // BLIMP_CLIENT_INPUT_BLIMP_INPUT_MANAGER_H_ | 108 #endif // BLIMP_CLIENT_INPUT_BLIMP_INPUT_MANAGER_H_ |
| OLD | NEW |