Chromium Code Reviews| 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 CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 5 #ifndef CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
| 6 #define CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 6 #define CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/mus/public/cpp/input_event_handler.h" | 11 #include "components/mus/public/cpp/input_event_handler.h" |
| 12 #include "components/mus/public/cpp/window.h" | 12 #include "components/mus/public/cpp/window.h" |
| 13 #include "components/mus/public/cpp/window_tree_connection.h" | 13 #include "components/mus/public/cpp/window_tree_connection.h" |
| 14 #include "components/mus/public/cpp/window_tree_delegate.h" | 14 #include "components/mus/public/cpp/window_tree_delegate.h" |
| 15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
| 16 #include "third_party/WebKit/public/web/WebInputEvent.h" | 16 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 17 #include "ui/events/event.h" | |
|
sky
2016/03/16 18:12:34
Do you really need the include here?
Hadi
2016/03/16 18:46:44
Done.
| |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 | 20 |
| 20 class InputHandlerManager; | 21 class InputHandlerManager; |
| 21 | 22 |
| 22 // CompositorMusConnection manages the connection to the Mandoline UI Service | 23 // CompositorMusConnection manages the connection to the Mandoline UI Service |
| 23 // (Mus) on the compositor thread. For operations that need to happen on the | 24 // (Mus) on the compositor thread. For operations that need to happen on the |
| 24 // main thread, CompositorMusConnection deals with passing information across | 25 // main thread, CompositorMusConnection deals with passing information across |
| 25 // threads. CompositorMusConnection is constructed on the main thread. By | 26 // threads. CompositorMusConnection is constructed on the main thread. By |
| 26 // default all other methods are assumed to run on the compositor thread unless | 27 // default all other methods are assumed to run on the compositor thread unless |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 void OnWindowInputEventAckOnMainThread(const base::Callback<void(bool)>& ack, | 65 void OnWindowInputEventAckOnMainThread(const base::Callback<void(bool)>& ack, |
| 65 bool handled); | 66 bool handled); |
| 66 | 67 |
| 67 // WindowTreeDelegate implementation: | 68 // WindowTreeDelegate implementation: |
| 68 void OnConnectionLost(mus::WindowTreeConnection* connection) override; | 69 void OnConnectionLost(mus::WindowTreeConnection* connection) override; |
| 69 void OnEmbed(mus::Window* root) override; | 70 void OnEmbed(mus::Window* root) override; |
| 70 | 71 |
| 71 // InputEventHandler implementation: | 72 // InputEventHandler implementation: |
| 72 void OnWindowInputEvent( | 73 void OnWindowInputEvent( |
| 73 mus::Window* window, | 74 mus::Window* window, |
| 74 mus::mojom::EventPtr event, | 75 ui::Event* event, |
| 75 scoped_ptr<base::Callback<void(bool)>>* ack_callback) override; | 76 scoped_ptr<base::Callback<void(bool)>>* ack_callback) override; |
| 76 | 77 |
| 77 const int routing_id_; | 78 const int routing_id_; |
| 78 mus::Window* root_; | 79 mus::Window* root_; |
| 79 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | 80 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 80 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 81 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
| 81 InputHandlerManager* const input_handler_manager_; | 82 InputHandlerManager* const input_handler_manager_; |
| 82 scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_; | 83 scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_; |
| 83 | 84 |
| 84 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); | 85 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); |
| 85 }; | 86 }; |
| 86 | 87 |
| 87 } // namespace content | 88 } // namespace content |
| 88 | 89 |
| 89 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 90 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
| OLD | NEW |