| 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/macros.h" | 10 #include "base/macros.h" |
| 10 #include "components/mus/public/cpp/input_event_handler.h" | 11 #include "components/mus/public/cpp/input_event_handler.h" |
| 11 #include "components/mus/public/cpp/window.h" | 12 #include "components/mus/public/cpp/window.h" |
| 12 #include "components/mus/public/cpp/window_tree_connection.h" | 13 #include "components/mus/public/cpp/window_tree_connection.h" |
| 13 #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" |
| 14 #include "third_party/WebKit/public/web/WebInputEvent.h" | 16 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 15 | 17 |
| 16 namespace content { | 18 namespace content { |
| 17 | 19 |
| 18 class InputHandlerManager; | 20 class InputHandlerManager; |
| 19 | 21 |
| 20 // CompositorMusConnection manages the connection to the Mandoline UI Service | 22 // CompositorMusConnection manages the connection to the Mandoline UI Service |
| 21 // (Mus) on the compositor thread. For operations that need to happen on the | 23 // (Mus) on the compositor thread. For operations that need to happen on the |
| 22 // main thread, CompositorMusConnection deals with passing information across | 24 // main thread, CompositorMusConnection deals with passing information across |
| 23 // threads. CompositorMusConnection is constructed on the main thread. By | 25 // threads. CompositorMusConnection is constructed on the main thread. By |
| 24 // default all other methods are assumed to run on the compositor thread unless | 26 // default all other methods are assumed to run on the compositor thread unless |
| 25 // explicited suffixed with OnMainThread. | 27 // explicited suffixed with OnMainThread. |
| 26 class CompositorMusConnection | 28 class CONTENT_EXPORT CompositorMusConnection |
| 27 : public mus::WindowTreeDelegate, | 29 : NON_EXPORTED_BASE(public mus::WindowTreeDelegate), |
| 28 public mus::InputEventHandler, | 30 NON_EXPORTED_BASE(public mus::InputEventHandler), |
| 29 public base::RefCountedThreadSafe<CompositorMusConnection> { | 31 public base::RefCountedThreadSafe<CompositorMusConnection> { |
| 30 public: | 32 public: |
| 31 // Created on main thread. | 33 // Created on main thread. |
| 32 CompositorMusConnection( | 34 CompositorMusConnection( |
| 33 int routing_id, | 35 int routing_id, |
| 34 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, | 36 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, |
| 35 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, | 37 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, |
| 36 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request, | 38 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> request, |
| 37 InputHandlerManager* input_handler_manager); | 39 InputHandlerManager* input_handler_manager); |
| 38 | 40 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 77 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
| 76 InputHandlerManager* const input_handler_manager_; | 78 InputHandlerManager* const input_handler_manager_; |
| 77 scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_; | 79 scoped_ptr<mus::WindowSurfaceBinding> window_surface_binding_; |
| 78 | 80 |
| 79 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); | 81 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); |
| 80 }; | 82 }; |
| 81 | 83 |
| 82 } // namespace content | 84 } // namespace content |
| 83 | 85 |
| 84 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 86 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
| OLD | NEW |