| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void RequestCompositorFrameSinkInternal( | 86 void RequestCompositorFrameSinkInternal( |
| 87 scoped_refptr<cc::ContextProvider> context_provider, | 87 scoped_refptr<cc::ContextProvider> context_provider, |
| 88 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 88 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 89 const CompositorFrameSinkCallback& callback); | 89 const CompositorFrameSinkCallback& callback); |
| 90 | 90 |
| 91 void AttachCompositorFrameSink( | 91 void AttachCompositorFrameSink( |
| 92 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> | 92 std::unique_ptr<ui::ClientCompositorFrameSinkBinding> |
| 93 compositor_frame_sink_binding); | 93 compositor_frame_sink_binding); |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 class FrameSinkObserver; |
| 97 |
| 96 friend class WindowPortMusTestApi; | 98 friend class WindowPortMusTestApi; |
| 97 friend class WindowTreeClient; | 99 friend class WindowTreeClient; |
| 98 friend class WindowTreeClientPrivate; | 100 friend class WindowTreeClientPrivate; |
| 99 friend class WindowTreeHostMus; | 101 friend class WindowTreeHostMus; |
| 100 | 102 |
| 101 using ServerChangeIdType = uint8_t; | 103 using ServerChangeIdType = uint8_t; |
| 102 | 104 |
| 103 // Changes to the underlying Window originating from the server must be done | 105 // Changes to the underlying Window originating from the server must be done |
| 104 // in such a way that the same change is not applied back to the server. To | 106 // in such a way that the same change is not applied back to the server. To |
| 105 // accomplish this every changes from the server is associated with at least | 107 // accomplish this every changes from the server is associated with at least |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 void OnVisibilityChanged(bool visible) override; | 259 void OnVisibilityChanged(bool visible) override; |
| 258 void OnDidChangeBounds(const gfx::Rect& old_bounds, | 260 void OnDidChangeBounds(const gfx::Rect& old_bounds, |
| 259 const gfx::Rect& new_bounds) override; | 261 const gfx::Rect& new_bounds) override; |
| 260 std::unique_ptr<ui::PropertyData> OnWillChangeProperty( | 262 std::unique_ptr<ui::PropertyData> OnWillChangeProperty( |
| 261 const void* key) override; | 263 const void* key) override; |
| 262 void OnPropertyChanged(const void* key, | 264 void OnPropertyChanged(const void* key, |
| 263 int64_t old_value, | 265 int64_t old_value, |
| 264 std::unique_ptr<ui::PropertyData> data) override; | 266 std::unique_ptr<ui::PropertyData> data) override; |
| 265 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override; | 267 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override; |
| 266 cc::SurfaceId GetSurfaceId() const override; | 268 cc::SurfaceId GetSurfaceId() const override; |
| 269 void SetNeedsBeginFrames(bool needs, |
| 270 base::RepeatingClosure callback) override; |
| 267 void OnWindowAddedToRootWindow() override {} | 271 void OnWindowAddedToRootWindow() override {} |
| 268 void OnWillRemoveWindowFromRootWindow() override {} | 272 void OnWillRemoveWindowFromRootWindow() override {} |
| 269 | 273 |
| 270 void UpdatePrimarySurfaceInfo(); | 274 void UpdatePrimarySurfaceInfo(); |
| 271 void UpdateClientSurfaceEmbedder(); | 275 void UpdateClientSurfaceEmbedder(); |
| 272 | 276 |
| 273 WindowTreeClient* window_tree_client_; | 277 WindowTreeClient* window_tree_client_; |
| 274 | 278 |
| 275 Window* window_ = nullptr; | 279 Window* window_ = nullptr; |
| 276 | 280 |
| 277 // Used when this window is embedding a client. | 281 // Used when this window is embedding a client. |
| 278 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; | 282 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; |
| 279 | 283 |
| 280 ServerChangeIdType next_server_change_id_ = 0; | 284 ServerChangeIdType next_server_change_id_ = 0; |
| 281 ServerChanges server_changes_; | 285 ServerChanges server_changes_; |
| 282 | 286 |
| 283 cc::FrameSinkId frame_sink_id_; | 287 cc::FrameSinkId frame_sink_id_; |
| 284 base::Closure pending_compositor_frame_sink_request_; | 288 base::Closure pending_compositor_frame_sink_request_; |
| 285 | 289 |
| 286 cc::SurfaceInfo primary_surface_info_; | 290 cc::SurfaceInfo primary_surface_info_; |
| 287 cc::SurfaceInfo fallback_surface_info_; | 291 cc::SurfaceInfo fallback_surface_info_; |
| 288 | 292 |
| 289 cc::LocalSurfaceId local_surface_id_; | 293 cc::LocalSurfaceId local_surface_id_; |
| 290 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; | 294 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; |
| 291 gfx::Size last_surface_size_; | 295 gfx::Size last_surface_size_; |
| 292 | 296 |
| 293 ui::CursorData cursor_; | 297 ui::CursorData cursor_; |
| 294 | 298 |
| 299 std::unique_ptr<FrameSinkObserver> frame_sink_observer_; |
| 300 |
| 295 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 301 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
| 296 }; | 302 }; |
| 297 | 303 |
| 298 } // namespace aura | 304 } // namespace aura |
| 299 | 305 |
| 300 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 306 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
| OLD | NEW |