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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Created on main thread. | 43 // Created on main thread. |
44 CompositorMusConnection( | 44 CompositorMusConnection( |
45 int routing_id, | 45 int routing_id, |
46 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, | 46 const scoped_refptr<base::SingleThreadTaskRunner>& main_task_runner, |
47 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, | 47 const scoped_refptr<base::SingleThreadTaskRunner>& compositor_task_runner, |
48 mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request, | 48 mojo::InterfaceRequest<ui::mojom::WindowTreeClient> request, |
49 InputHandlerManager* input_handler_manager); | 49 InputHandlerManager* input_handler_manager); |
50 | 50 |
51 // Attaches the provided |surface_binding| with the ui::Window for the | 51 // Attaches the provided |surface_binding| with the ui::Window for the |
52 // renderer once it becomes available. | 52 // renderer once it becomes available. |
53 void AttachSurfaceOnMainThread( | 53 void AttachCompositorFrameSinkOnMainThread( |
54 std::unique_ptr<ui::WindowSurfaceBinding> surface_binding); | 54 std::unique_ptr<ui::WindowSurfaceBinding> surface_binding); |
55 | 55 |
56 private: | 56 private: |
57 friend class CompositorMusConnectionTest; | 57 friend class CompositorMusConnectionTest; |
58 friend class base::RefCountedThreadSafe<CompositorMusConnection>; | 58 friend class base::RefCountedThreadSafe<CompositorMusConnection>; |
59 | 59 |
60 ~CompositorMusConnection() override; | 60 ~CompositorMusConnection() override; |
61 | 61 |
62 void AttachSurfaceOnCompositorThread( | 62 void AttachCompositorFrameSinkOnCompositorThread( |
63 std::unique_ptr<ui::WindowSurfaceBinding> surface_binding); | 63 std::unique_ptr<ui::WindowSurfaceBinding> surface_binding); |
64 | 64 |
65 void CreateWindowTreeClientOnCompositorThread( | 65 void CreateWindowTreeClientOnCompositorThread( |
66 ui::mojom::WindowTreeClientRequest request); | 66 ui::mojom::WindowTreeClientRequest request); |
67 | 67 |
68 void OnConnectionLostOnMainThread(); | 68 void OnConnectionLostOnMainThread(); |
69 | 69 |
70 void OnWindowInputEventOnMainThread( | 70 void OnWindowInputEventOnMainThread( |
71 ui::ScopedWebInputEvent web_event, | 71 ui::ScopedWebInputEvent web_event, |
72 const base::Callback<void(ui::mojom::EventResult)>& ack); | 72 const base::Callback<void(ui::mojom::EventResult)>& ack); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 | 113 |
114 // Stores the current state of the active pointers targeting this object. | 114 // Stores the current state of the active pointers targeting this object. |
115 ui::MotionEventAura pointer_state_; | 115 ui::MotionEventAura pointer_state_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); | 117 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace content | 120 } // namespace content |
121 | 121 |
122 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ | 122 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ |
OLD | NEW |