| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_UI_WS_SERVER_WINDOW_H_ | 5 #ifndef SERVICES_UI_WS_SERVER_WINDOW_H_ |
| 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ | 6 #define SERVICES_UI_WS_SERVER_WINDOW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 17 #include "cc/ipc/display_compositor.mojom.h" |
| 18 #include "cc/ipc/mojo_compositor_frame_sink.mojom.h" |
| 17 #include "mojo/public/cpp/bindings/binding.h" | 19 #include "mojo/public/cpp/bindings/binding.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/ws/ids.h" | 21 #include "services/ui/ws/ids.h" |
| 20 #include "ui/gfx/geometry/insets.h" | 22 #include "ui/gfx/geometry/insets.h" |
| 21 #include "ui/gfx/geometry/rect.h" | 23 #include "ui/gfx/geometry/rect.h" |
| 22 #include "ui/gfx/geometry/vector2d.h" | 24 #include "ui/gfx/geometry/vector2d.h" |
| 23 #include "ui/gfx/transform.h" | 25 #include "ui/gfx/transform.h" |
| 24 #include "ui/platform_window/text_input_state.h" | 26 #include "ui/platform_window/text_input_state.h" |
| 25 | 27 |
| 26 namespace ui { | 28 namespace ui { |
| (...skipping 24 matching lines...) Expand all Loading... |
| 51 const WindowId& id, | 53 const WindowId& id, |
| 52 const Properties& properties); | 54 const Properties& properties); |
| 53 ~ServerWindow(); | 55 ~ServerWindow(); |
| 54 | 56 |
| 55 void AddObserver(ServerWindowObserver* observer); | 57 void AddObserver(ServerWindowObserver* observer); |
| 56 void RemoveObserver(ServerWindowObserver* observer); | 58 void RemoveObserver(ServerWindowObserver* observer); |
| 57 bool HasObserver(ServerWindowObserver* observer); | 59 bool HasObserver(ServerWindowObserver* observer); |
| 58 | 60 |
| 59 // Creates a new CompositorFrameSink of the specified type, replacing the | 61 // Creates a new CompositorFrameSink of the specified type, replacing the |
| 60 // existing. | 62 // existing. |
| 61 // TODO(fsamuel): We should not be passing in |gpu_memory_buffer_manager| and | |
| 62 // |context_provider|. The window server should not know anything about them. | |
| 63 // Instead, they should be a CompositorFrameSink service-side implementation | |
| 64 // detail. | |
| 65 void CreateDisplayCompositorFrameSink( | 63 void CreateDisplayCompositorFrameSink( |
| 66 gfx::AcceleratedWidget widget, | 64 gfx::AcceleratedWidget widget, |
| 67 cc::mojom::MojoCompositorFrameSinkRequest request, | 65 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 68 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 66 cc::mojom::MojoCompositorFrameSinkClientPtr client, |
| 67 cc::mojom::DisplayPrivateRequest display_private_request); |
| 69 void CreateOffscreenCompositorFrameSink( | 68 void CreateOffscreenCompositorFrameSink( |
| 70 mojom::CompositorFrameSinkType compositor_frame_sink_type, | 69 mojom::CompositorFrameSinkType compositor_frame_sink_type, |
| 71 cc::mojom::MojoCompositorFrameSinkRequest request, | 70 cc::mojom::MojoCompositorFrameSinkRequest request, |
| 72 cc::mojom::MojoCompositorFrameSinkClientPtr client); | 71 cc::mojom::MojoCompositorFrameSinkClientPtr client); |
| 73 | 72 |
| 74 const WindowId& id() const { return id_; } | 73 const WindowId& id() const { return id_; } |
| 75 | 74 |
| 76 void Add(ServerWindow* child); | 75 void Add(ServerWindow* child); |
| 77 void Remove(ServerWindow* child); | 76 void Remove(ServerWindow* child); |
| 78 void Reorder(ServerWindow* relative, mojom::OrderDirection diretion); | 77 void Reorder(ServerWindow* relative, mojom::OrderDirection diretion); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 267 |
| 269 base::ObserverList<ServerWindowObserver> observers_; | 268 base::ObserverList<ServerWindowObserver> observers_; |
| 270 | 269 |
| 271 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 270 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
| 272 }; | 271 }; |
| 273 | 272 |
| 274 } // namespace ws | 273 } // namespace ws |
| 275 } // namespace ui | 274 } // namespace ui |
| 276 | 275 |
| 277 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ | 276 #endif // SERVICES_UI_WS_SERVER_WINDOW_H_ |
| OLD | NEW |