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

Side by Side Diff: ui/aura/mus/window_port_mus.h

Issue 2934523002: Revert of Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: Created 3 years, 6 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 | « ui/aura/mus/window_mus.h ('k') | ui/aura/mus/window_port_mus.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 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "cc/surfaces/surface_info.h" 15 #include "cc/surfaces/surface_info.h"
16 #include "components/viz/client/client_compositor_frame_sink.h" 16 #include "components/viz/client/client_compositor_frame_sink.h"
17 #include "services/ui/public/interfaces/cursor/cursor.mojom.h" 17 #include "services/ui/public/interfaces/cursor/cursor.mojom.h"
18 #include "services/ui/public/interfaces/window_tree.mojom.h" 18 #include "services/ui/public/interfaces/window_tree.mojom.h"
19 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" 19 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
20 #include "ui/aura/aura_export.h" 20 #include "ui/aura/aura_export.h"
21 #include "ui/aura/mus/mus_types.h" 21 #include "ui/aura/mus/mus_types.h"
22 #include "ui/aura/mus/window_mus.h" 22 #include "ui/aura/mus/window_mus.h"
23 #include "ui/aura/window_port.h" 23 #include "ui/aura/window_port.h"
24 #include "ui/gfx/geometry/rect.h" 24 #include "ui/gfx/geometry/rect.h"
25 #include "ui/platform_window/mojo/text_input_state.mojom.h" 25 #include "ui/platform_window/mojo/text_input_state.mojom.h"
26 26
27 namespace viz {
28 class ClientCompositorFrameSink;
29 }
30
31 namespace aura { 27 namespace aura {
32 28
33 class ClientSurfaceEmbedder; 29 class ClientSurfaceEmbedder;
34 class PropertyConverter; 30 class PropertyConverter;
35 class Window; 31 class Window;
36 class WindowPortMusTestApi; 32 class WindowPortMusTestApi;
37 class WindowTreeClient; 33 class WindowTreeClient;
38 class WindowTreeClientPrivate; 34 class WindowTreeClientPrivate;
39 class WindowTreeHostMus; 35 class WindowTreeHostMus;
40 36
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 69
74 // Sets whether this window can accept drops, defaults to false. 70 // Sets whether this window can accept drops, defaults to false.
75 void SetCanAcceptDrops(bool can_accept_drops); 71 void SetCanAcceptDrops(bool can_accept_drops);
76 72
77 // Embeds a new client in this Window. See WindowTreeClient::Embed() for 73 // Embeds a new client in this Window. See WindowTreeClient::Embed() for
78 // details on arguments. 74 // details on arguments.
79 void Embed(ui::mojom::WindowTreeClientPtr client, 75 void Embed(ui::mojom::WindowTreeClientPtr client,
80 uint32_t flags, 76 uint32_t flags,
81 const ui::mojom::WindowTree::EmbedCallback& callback); 77 const ui::mojom::WindowTree::EmbedCallback& callback);
82 78
83 std::unique_ptr<viz::ClientCompositorFrameSink> RequestCompositorFrameSink( 79 std::unique_ptr<cc::CompositorFrameSink> RequestCompositorFrameSink(
84 scoped_refptr<cc::ContextProvider> context_provider, 80 scoped_refptr<cc::ContextProvider> context_provider,
85 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); 81 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager);
86 82
87 private: 83 private:
88 friend class WindowPortMusTestApi; 84 friend class WindowPortMusTestApi;
89 friend class WindowTreeClient; 85 friend class WindowTreeClient;
90 friend class WindowTreeClientPrivate; 86 friend class WindowTreeClientPrivate;
91 friend class WindowTreeHostMus; 87 friend class WindowTreeHostMus;
92 88
93 using ServerChangeIdType = uint8_t; 89 using ServerChangeIdType = uint8_t;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 void SetTransformFromServer(const gfx::Transform& transform) override; 216 void SetTransformFromServer(const gfx::Transform& transform) override;
221 void SetVisibleFromServer(bool visible) override; 217 void SetVisibleFromServer(bool visible) override;
222 void SetOpacityFromServer(float opacity) override; 218 void SetOpacityFromServer(float opacity) override;
223 void SetCursorFromServer(const ui::CursorData& cursor) override; 219 void SetCursorFromServer(const ui::CursorData& cursor) override;
224 void SetPropertyFromServer( 220 void SetPropertyFromServer(
225 const std::string& property_name, 221 const std::string& property_name,
226 const std::vector<uint8_t>* property_data) override; 222 const std::vector<uint8_t>* property_data) override;
227 void SetFrameSinkIdFromServer(const cc::FrameSinkId& frame_sink_id) override; 223 void SetFrameSinkIdFromServer(const cc::FrameSinkId& frame_sink_id) override;
228 const cc::LocalSurfaceId& GetOrAllocateLocalSurfaceId( 224 const cc::LocalSurfaceId& GetOrAllocateLocalSurfaceId(
229 const gfx::Size& surface_size_in_pixels) override; 225 const gfx::Size& surface_size_in_pixels) override;
226 void SetPrimarySurfaceInfo(const cc::SurfaceInfo& surface_info) override;
230 void SetFallbackSurfaceInfo(const cc::SurfaceInfo& surface_info) override; 227 void SetFallbackSurfaceInfo(const cc::SurfaceInfo& surface_info) override;
231 void DestroyFromServer() override; 228 void DestroyFromServer() override;
232 void AddTransientChildFromServer(WindowMus* child) override; 229 void AddTransientChildFromServer(WindowMus* child) override;
233 void RemoveTransientChildFromServer(WindowMus* child) override; 230 void RemoveTransientChildFromServer(WindowMus* child) override;
234 ChangeSource OnTransientChildAdded(WindowMus* child) override; 231 ChangeSource OnTransientChildAdded(WindowMus* child) override;
235 ChangeSource OnTransientChildRemoved(WindowMus* child) override; 232 ChangeSource OnTransientChildRemoved(WindowMus* child) override;
236 const cc::LocalSurfaceId& GetLocalSurfaceId() override; 233 const cc::LocalSurfaceId& GetLocalSurfaceId() override;
237 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange( 234 std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange(
238 const gfx::Rect& bounds) override; 235 const gfx::Rect& bounds) override;
239 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange( 236 std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange(
240 bool value) override; 237 bool value) override;
241 void PrepareForDestroy() override; 238 void PrepareForDestroy() override;
242 void PrepareForTransientRestack(WindowMus* window) override; 239 void PrepareForTransientRestack(WindowMus* window) override;
243 void OnTransientRestackDone(WindowMus* window) override; 240 void OnTransientRestackDone(WindowMus* window) override;
244 void NotifyEmbeddedAppDisconnected() override; 241 void NotifyEmbeddedAppDisconnected() override;
245 bool HasLocalCompositorFrameSink() override;
246 242
247 // WindowPort: 243 // WindowPort:
248 void OnPreInit(Window* window) override; 244 void OnPreInit(Window* window) override;
249 void OnDeviceScaleFactorChanged(float device_scale_factor) override; 245 void OnDeviceScaleFactorChanged(float device_scale_factor) override;
250 void OnWillAddChild(Window* child) override; 246 void OnWillAddChild(Window* child) override;
251 void OnWillRemoveChild(Window* child) override; 247 void OnWillRemoveChild(Window* child) override;
252 void OnWillMoveChild(size_t current_index, size_t dest_index) override; 248 void OnWillMoveChild(size_t current_index, size_t dest_index) override;
253 void OnVisibilityChanged(bool visible) override; 249 void OnVisibilityChanged(bool visible) override;
254 void OnDidChangeBounds(const gfx::Rect& old_bounds, 250 void OnDidChangeBounds(const gfx::Rect& old_bounds,
255 const gfx::Rect& new_bounds) override; 251 const gfx::Rect& new_bounds) override;
(...skipping 26 matching lines...) Expand all
282 278
283 cc::SurfaceInfo primary_surface_info_; 279 cc::SurfaceInfo primary_surface_info_;
284 cc::SurfaceInfo fallback_surface_info_; 280 cc::SurfaceInfo fallback_surface_info_;
285 281
286 cc::LocalSurfaceId local_surface_id_; 282 cc::LocalSurfaceId local_surface_id_;
287 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; 283 cc::LocalSurfaceIdAllocator local_surface_id_allocator_;
288 gfx::Size last_surface_size_in_pixels_; 284 gfx::Size last_surface_size_in_pixels_;
289 285
290 ui::CursorData cursor_; 286 ui::CursorData cursor_;
291 287
292 // When a frame sink is created
293 // for a local aura::Window, we need keep a weak ptr of it, so we can update
294 // the local surface id when necessary.
295 base::WeakPtr<viz::ClientCompositorFrameSink> local_compositor_frame_sink_;
296
297 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); 288 DISALLOW_COPY_AND_ASSIGN(WindowPortMus);
298 }; 289 };
299 290
300 } // namespace aura 291 } // namespace aura
301 292
302 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ 293 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_
OLDNEW
« no previous file with comments | « ui/aura/mus/window_mus.h ('k') | ui/aura/mus/window_port_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698