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> |
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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 int64_t old_value, | 257 int64_t old_value, |
256 std::unique_ptr<ui::PropertyData> data) override; | 258 std::unique_ptr<ui::PropertyData> data) override; |
257 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override; | 259 std::unique_ptr<cc::CompositorFrameSink> CreateCompositorFrameSink() override; |
258 cc::SurfaceId GetSurfaceId() const override; | 260 cc::SurfaceId GetSurfaceId() const override; |
259 void OnWindowAddedToRootWindow() override {} | 261 void OnWindowAddedToRootWindow() override {} |
260 void OnWillRemoveWindowFromRootWindow() override {} | 262 void OnWillRemoveWindowFromRootWindow() override {} |
261 | 263 |
262 void UpdatePrimarySurfaceInfo(); | 264 void UpdatePrimarySurfaceInfo(); |
263 void UpdateClientSurfaceEmbedder(); | 265 void UpdateClientSurfaceEmbedder(); |
264 | 266 |
267 // Called from ClientCompositorFrameSink. | |
268 void OnSurfaceChanged(const cc::LocalSurfaceId& local_surface_id, | |
Fady Samuel
2017/05/18 16:48:51
Delete this.
Peng
2017/05/18 19:37:59
Done.
| |
269 const gfx::Size& surface_size); | |
270 | |
265 WindowTreeClient* window_tree_client_; | 271 WindowTreeClient* window_tree_client_; |
266 | 272 |
267 Window* window_ = nullptr; | 273 Window* window_ = nullptr; |
268 | 274 |
269 // Used when this window is embedding a client. | 275 // Used when this window is embedding a client. |
270 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; | 276 std::unique_ptr<ClientSurfaceEmbedder> client_surface_embedder_; |
271 | 277 |
272 ServerChangeIdType next_server_change_id_ = 0; | 278 ServerChangeIdType next_server_change_id_ = 0; |
273 ServerChanges server_changes_; | 279 ServerChanges server_changes_; |
274 | 280 |
275 cc::FrameSinkId frame_sink_id_; | 281 cc::FrameSinkId frame_sink_id_; |
276 | 282 |
277 cc::SurfaceInfo primary_surface_info_; | 283 cc::SurfaceInfo primary_surface_info_; |
278 cc::SurfaceInfo fallback_surface_info_; | 284 cc::SurfaceInfo fallback_surface_info_; |
279 | 285 |
280 cc::LocalSurfaceId local_surface_id_; | 286 cc::LocalSurfaceId local_surface_id_; |
281 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; | 287 cc::LocalSurfaceIdAllocator local_surface_id_allocator_; |
282 gfx::Size last_surface_size_; | 288 gfx::Size last_surface_size_; |
283 | 289 |
284 ui::CursorData cursor_; | 290 ui::CursorData cursor_; |
285 | 291 |
292 scoped_refptr<cc::SurfaceReferenceFactory> ref_factory_; | |
Fady Samuel
2017/05/18 16:48:51
Delete this.
Peng
2017/05/18 19:37:59
Done.
| |
293 | |
294 base::WeakPtrFactory<WindowPortMus> weak_factory_; | |
Fady Samuel
2017/05/18 16:48:51
Delete this.
Peng
2017/05/18 19:37:59
Done.
| |
295 | |
286 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); | 296 DISALLOW_COPY_AND_ASSIGN(WindowPortMus); |
287 }; | 297 }; |
288 | 298 |
289 } // namespace aura | 299 } // namespace aura |
290 | 300 |
291 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ | 301 #endif // UI_AURA_MUS_WINDOW_PORT_MUS_H_ |
OLD | NEW |