Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Side by Side Diff: content/renderer/mus/compositor_mus_connection.h

Issue 2429173005: Mus+Ash: Replace (Server)WindowSurface with (Server)WindowCompositorFrameSink (Closed)
Patch Set: Rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/mus/OWNERS ('k') | content/renderer/mus/compositor_mus_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 30 matching lines...) Expand all
41 public base::RefCountedThreadSafe<CompositorMusConnection> { 41 public base::RefCountedThreadSafe<CompositorMusConnection> {
42 public: 42 public:
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 |compositor_frame_sink_binding| with the ui::Window
52 // renderer once it becomes available. 52 // for the renderer once it becomes available.
53 void AttachCompositorFrameSinkOnMainThread( 53 void AttachCompositorFrameSinkOnMainThread(
54 std::unique_ptr<ui::WindowSurfaceBinding> surface_binding); 54 std::unique_ptr<ui::WindowCompositorFrameSinkBinding>
55 compositor_frame_sink_binding);
55 56
56 private: 57 private:
57 friend class CompositorMusConnectionTest; 58 friend class CompositorMusConnectionTest;
58 friend class base::RefCountedThreadSafe<CompositorMusConnection>; 59 friend class base::RefCountedThreadSafe<CompositorMusConnection>;
59 60
60 ~CompositorMusConnection() override; 61 ~CompositorMusConnection() override;
61 62
62 void AttachCompositorFrameSinkOnCompositorThread( 63 void AttachCompositorFrameSinkOnCompositorThread(
63 std::unique_ptr<ui::WindowSurfaceBinding> surface_binding); 64 std::unique_ptr<ui::WindowCompositorFrameSinkBinding>
65 compositor_frame_sink_binding);
64 66
65 void CreateWindowTreeClientOnCompositorThread( 67 void CreateWindowTreeClientOnCompositorThread(
66 ui::mojom::WindowTreeClientRequest request); 68 ui::mojom::WindowTreeClientRequest request);
67 69
68 void OnConnectionLostOnMainThread(); 70 void OnConnectionLostOnMainThread();
69 71
70 void OnWindowInputEventOnMainThread( 72 void OnWindowInputEventOnMainThread(
71 ui::ScopedWebInputEvent web_event, 73 ui::ScopedWebInputEvent web_event,
72 const base::Callback<void(ui::mojom::EventResult)>& ack); 74 const base::Callback<void(ui::mojom::EventResult)>& ack);
73 75
(...skipping 28 matching lines...) Expand all
102 104
103 const int routing_id_; 105 const int routing_id_;
104 // Use this lock when accessing |window_tree_client_|. Lock exists solely for 106 // Use this lock when accessing |window_tree_client_|. Lock exists solely for
105 // DCHECK in destructor. 107 // DCHECK in destructor.
106 base::Lock window_tree_client_lock_; 108 base::Lock window_tree_client_lock_;
107 std::unique_ptr<ui::WindowTreeClient> window_tree_client_; 109 std::unique_ptr<ui::WindowTreeClient> window_tree_client_;
108 ui::Window* root_; 110 ui::Window* root_;
109 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; 111 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_;
110 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; 112 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_;
111 InputHandlerManager* const input_handler_manager_; 113 InputHandlerManager* const input_handler_manager_;
112 std::unique_ptr<ui::WindowSurfaceBinding> window_surface_binding_; 114 std::unique_ptr<ui::WindowCompositorFrameSinkBinding>
115 window_compositor_frame_sink_binding_;
113 116
114 // Stores the current state of the active pointers targeting this object. 117 // Stores the current state of the active pointers targeting this object.
115 ui::MotionEventAura pointer_state_; 118 ui::MotionEventAura pointer_state_;
116 119
117 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection); 120 DISALLOW_COPY_AND_ASSIGN(CompositorMusConnection);
118 }; 121 };
119 122
120 } // namespace content 123 } // namespace content
121 124
122 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_ 125 #endif // CONTENT_RENDERER_MUS_COMPOSITOR_MUS_CONNECTION_H_
OLDNEW
« no previous file with comments | « content/renderer/mus/OWNERS ('k') | content/renderer/mus/compositor_mus_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698