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

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

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: WIP Created 3 years, 7 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
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 "base/memory/weak_ptr.h"
15 #include "cc/surfaces/surface_info.h" 16 #include "cc/surfaces/surface_info.h"
17 #include "cc/surfaces/surface_reference_factory.h"
16 #include "services/ui/public/cpp/client_compositor_frame_sink.h" 18 #include "services/ui/public/cpp/client_compositor_frame_sink.h"
17 #include "services/ui/public/interfaces/cursor/cursor.mojom.h" 19 #include "services/ui/public/interfaces/cursor/cursor.mojom.h"
18 #include "services/ui/public/interfaces/window_tree.mojom.h" 20 #include "services/ui/public/interfaces/window_tree.mojom.h"
19 #include "services/ui/public/interfaces/window_tree_constants.mojom.h" 21 #include "services/ui/public/interfaces/window_tree_constants.mojom.h"
20 #include "ui/aura/aura_export.h" 22 #include "ui/aura/aura_export.h"
21 #include "ui/aura/mus/mus_types.h" 23 #include "ui/aura/mus/mus_types.h"
22 #include "ui/aura/mus/window_mus.h" 24 #include "ui/aura/mus/window_mus.h"
23 #include "ui/aura/window_port.h" 25 #include "ui/aura/window_port.h"
24 #include "ui/gfx/geometry/rect.h" 26 #include "ui/gfx/geometry/rect.h"
25 #include "ui/platform_window/mojo/text_input_state.mojom.h" 27 #include "ui/platform_window/mojo/text_input_state.mojom.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
267 void OnWindowAddedToRootWindow() override {} 269 void OnWindowAddedToRootWindow() override {}
268 void OnWillRemoveWindowFromRootWindow() override {} 270 void OnWillRemoveWindowFromRootWindow() override {}
269 271
270 void UpdatePrimarySurfaceInfo(); 272 void UpdatePrimarySurfaceInfo();
271 void UpdateClientSurfaceEmbedder(); 273 void UpdateClientSurfaceEmbedder();
272 274
275 // Called from ClientCompositorFrameSink.
276 void OnSurfaceChanged(const cc::LocalSurfaceId& local_surface_id,
277 const gfx::Size& surface_size);
278
273 WindowTreeClient* window_tree_client_; 279 WindowTreeClient* window_tree_client_;
274 280
275 Window* window_ = nullptr; 281 Window* window_ = nullptr;
276 282
277 // Used when this window is embedding a client. 283 // Used when this window is embedding a client.
278 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; 284 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_;
279 285
280 ServerChangeIdType next_server_change_id_ = 0; 286 ServerChangeIdType next_server_change_id_ = 0;
281 ServerChanges server_changes_; 287 ServerChanges server_changes_;
282 288
283 cc::FrameSinkId frame_sink_id_; 289 cc::FrameSinkId frame_sink_id_;
284 base::Closure pending_compositor_frame_sink_request_; 290 base::Closure pending_compositor_frame_sink_request_;
285 291
286 cc::SurfaceInfo primary_surface_info_; 292 cc::SurfaceInfo primary_surface_info_;
287 cc::SurfaceInfo fallback_surface_info_; 293 cc::SurfaceInfo fallback_surface_info_;
288 294
289 cc::LocalSurfaceId local_surface_id_; 295 cc::LocalSurfaceId local_surface_id_;
290 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; 296 cc::LocalSurfaceIdAllocator local_surface_id_allocator_;
291 gfx::Size last_surface_size_; 297 gfx::Size last_surface_size_;
292 298
293 ui::CursorData cursor_; 299 ui::CursorData cursor_;
294 300
301 scoped_refptr<cc::SurfaceReferenceFactory> ref_factory_;
302
303 base::WeakPtrFactory<WindowPortMus> weak_factory_;
304
295 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); 305 DISALLOW_COPY_AND_ASSIGN(WindowPortMus);
296 }; 306 };
297 307
298 } // namespace aura 308 } // namespace aura
299 309
300 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ 310 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698