| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 5 #ifndef UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
| 6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 6 #define UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 // Sets whether this window can accept drops, defaults to false. | 62 // Sets whether this window can accept drops, defaults to false. |
| 63 void SetCanAcceptDrops(bool can_accept_drops); | 63 void SetCanAcceptDrops(bool can_accept_drops); |
| 64 | 64 |
| 65 // Embeds a new client in this Window. See WindowTreeClient::Embed() for | 65 // Embeds a new client in this Window. See WindowTreeClient::Embed() for |
| 66 // details on arguments. | 66 // details on arguments. |
| 67 void Embed(ui::mojom::WindowTreeClientPtr client, | 67 void Embed(ui::mojom::WindowTreeClientPtr client, |
| 68 uint32_t flags, | 68 uint32_t flags, |
| 69 const ui::mojom::WindowTree::EmbedCallback& callback); | 69 const ui::mojom::WindowTree::EmbedCallback& callback); |
| 70 | 70 |
| 71 std::unique_ptr<ui::ClientCompositorFrameSink> RequestCompositorFrameSink( | 71 using CompositorFrameSinkCallback = |
| 72 base::Callback<void(std::unique_ptr<cc::CompositorFrameSink>)>; |
| 73 void RequestCompositorFrameSink( |
| 72 scoped_refptr<cc::ContextProvider> context_provider, | 74 scoped_refptr<cc::ContextProvider> context_provider, |
| 73 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); | 75 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 76 const CompositorFrameSinkCallback& callback); |
| 77 |
| 78 void RequestCompositorFrameSinkInternal( |
| 79 scoped_refptr<cc::ContextProvider> context_provider, |
| 80 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 81 const CompositorFrameSinkCallback& callback); |
| 74 | 82 |
| 75 void AttachCompositorFrameSink( | 83 void AttachCompositorFrameSink( |
| 76 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> | 84 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> |
| 77 compositor_frame_sink_binding); | 85 compositor_frame_sink_binding); |
| 78 | 86 |
| 79 private: | 87 private: |
| 80 friend class WindowPortMusTestApi; | 88 friend class WindowPortMusTestApi; |
| 81 friend class WindowTreeClient; | 89 friend class WindowTreeClient; |
| 82 friend class WindowTreeClientPrivate; | 90 friend class WindowTreeClientPrivate; |
| 83 friend class WindowTreeHostMus; | 91 friend class WindowTreeHostMus; |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 void ReorderFromServer(WindowMus* child, | 211 void ReorderFromServer(WindowMus* child, |
| 204 WindowMus* relative, | 212 WindowMus* relative, |
| 205 ui::mojom::OrderDirection) override; | 213 ui::mojom::OrderDirection) override; |
| 206 void SetBoundsFromServer(const gfx::Rect& bounds) override; | 214 void SetBoundsFromServer(const gfx::Rect& bounds) override; |
| 207 void SetVisibleFromServer(bool visible) override; | 215 void SetVisibleFromServer(bool visible) override; |
| 208 void SetOpacityFromServer(float opacity) override; | 216 void SetOpacityFromServer(float opacity) override; |
| 209 void SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) override; | 217 void SetPredefinedCursorFromServer(ui::mojom::Cursor cursor) override; |
| 210 void SetPropertyFromServer( | 218 void SetPropertyFromServer( |
| 211 const std::string& property_name, | 219 const std::string& property_name, |
| 212 const std::vector<uint8_t>* property_data) override; | 220 const std::vector<uint8_t>* property_data) override; |
| 221 void SetFrameSinkIdFromServer(const cc::FrameSinkId& frame_sink_id) override; |
| 213 void SetSurfaceInfoFromServer(const cc::SurfaceInfo& surface_info) override; | 222 void SetSurfaceInfoFromServer(const cc::SurfaceInfo& surface_info) override; |
| 214 void DestroyFromServer() override; | 223 void DestroyFromServer() override; |
| 215 void AddTransientChildFromServer(WindowMus* child) override; | 224 void AddTransientChildFromServer(WindowMus* child) override; |
| 216 void RemoveTransientChildFromServer(WindowMus* child) override; | 225 void RemoveTransientChildFromServer(WindowMus* child) override; |
| 217 ChangeSource OnTransientChildAdded(WindowMus* child) override; | 226 ChangeSource OnTransientChildAdded(WindowMus* child) override; |
| 218 ChangeSource OnTransientChildRemoved(WindowMus* child) override; | 227 ChangeSource OnTransientChildRemoved(WindowMus* child) override; |
| 219 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( | 228 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( |
| 220 const gfx::Rect& bounds) override; | 229 const gfx::Rect& bounds) override; |
| 221 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( | 230 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( |
| 222 bool value) override; | 231 bool value) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 243 WindowTreeClient* window_tree_client_; | 252 WindowTreeClient* window_tree_client_; |
| 244 | 253 |
| 245 Window* window_ = nullptr; | 254 Window* window_ = nullptr; |
| 246 | 255 |
| 247 // Used when this window is embedding a client. | 256 // Used when this window is embedding a client. |
| 248 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder; | 257 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder; |
| 249 | 258 |
| 250 ServerChangeIdType next_server_change_id_ = 0; | 259 ServerChangeIdType next_server_change_id_ = 0; |
| 251 ServerChanges server_changes_; | 260 ServerChanges server_changes_; |
| 252 | 261 |
| 262 cc::FrameSinkId frame_sink_id_; |
| 263 base::Closure pending_compositor_frame_sink_request_; |
| 264 |
| 253 cc::SurfaceInfo surface_info_; | 265 cc::SurfaceInfo surface_info_; |
| 254 | 266 |
| 255 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; | 267 ui::mojom::Cursor predefined_cursor_ = ui::mojom::Cursor::CURSOR_NULL; |
| 256 | 268 |
| 257 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 269 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
| 258 }; | 270 }; |
| 259 | 271 |
| 260 } // namespace aura | 272 } // namespace aura |
| 261 | 273 |
| 262 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 274 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
| OLD | NEW |