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_PUBLIC_CPP_WINDOW_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "mojo/public/cpp/bindings/array.h" | 14 #include "mojo/public/cpp/bindings/array.h" |
15 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" | 15 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" |
16 #include "services/ui/common/types.h" | 16 #include "services/ui/common/types.h" |
17 #include "services/ui/public/cpp/compositor_frame_sink.h" | |
18 #include "services/ui/public/cpp/surface_id_handler.h" | 17 #include "services/ui/public/cpp/surface_id_handler.h" |
18 #include "services/ui/public/cpp/window_compositor_frame_sink.h" | |
19 #include "services/ui/public/interfaces/mus_constants.mojom.h" | 19 #include "services/ui/public/interfaces/mus_constants.mojom.h" |
20 #include "services/ui/public/interfaces/window_tree.mojom.h" | 20 #include "services/ui/public/interfaces/window_tree.mojom.h" |
21 #include "ui/gfx/geometry/insets.h" | 21 #include "ui/gfx/geometry/insets.h" |
22 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
23 | 23 |
24 namespace gfx { | 24 namespace gfx { |
25 class Size; | 25 class Size; |
26 } | 26 } |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
29 | 29 |
30 class InputEventHandler; | 30 class InputEventHandler; |
31 class ServiceProviderImpl; | 31 class ServiceProviderImpl; |
32 class SurfaceIdHandler; | 32 class SurfaceIdHandler; |
33 class WindowObserver; | 33 class WindowObserver; |
34 class WindowSurface; | 34 class WindowSurface; |
35 class WindowSurfaceBinding; | 35 class WindowCompositorFrameSinkBinding; |
rjkroege
2016/10/20 22:22:18
these need to be in alphabetical order
Fady Samuel
2016/10/21 20:53:27
Done.
| |
36 class WindowDropTarget; | 36 class WindowDropTarget; |
37 class WindowTreeClient; | 37 class WindowTreeClient; |
38 class WindowTreeClientPrivate; | 38 class WindowTreeClientPrivate; |
39 | 39 |
40 namespace { | 40 namespace { |
41 class OrderChangedNotifier; | 41 class OrderChangedNotifier; |
42 } | 42 } |
43 | 43 |
44 // Defined in window_property.h (which we do not include) | 44 // Defined in window_property.h (which we do not include) |
45 template <typename T> | 45 template <typename T> |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 void SetOpacity(float opacity); | 108 void SetOpacity(float opacity); |
109 | 109 |
110 // Cursors | 110 // Cursors |
111 mojom::Cursor predefined_cursor() const { return cursor_id_; } | 111 mojom::Cursor predefined_cursor() const { return cursor_id_; } |
112 void SetPredefinedCursor(ui::mojom::Cursor cursor_id); | 112 void SetPredefinedCursor(ui::mojom::Cursor cursor_id); |
113 | 113 |
114 // A Window is drawn if the Window and all its ancestors are visible and the | 114 // A Window is drawn if the Window and all its ancestors are visible and the |
115 // Window is attached to the root. | 115 // Window is attached to the root. |
116 bool IsDrawn() const; | 116 bool IsDrawn() const; |
117 | 117 |
118 std::unique_ptr<CompositorFrameSink> RequestCompositorFrameSink( | 118 std::unique_ptr<WindowCompositorFrameSink> RequestCompositorFrameSink( |
119 mojom::SurfaceType type, | 119 mojom::CompositorFrameSinkType type, |
120 scoped_refptr<cc::ContextProvider> context_provider); | 120 scoped_refptr<cc::ContextProvider> context_provider); |
121 | 121 |
122 void AttachCompositorFrameSink( | 122 void AttachCompositorFrameSink( |
123 mojom::SurfaceType type, | 123 mojom::CompositorFrameSinkType type, |
124 std::unique_ptr<WindowSurfaceBinding> surface_binding); | 124 std::unique_ptr<WindowCompositorFrameSinkBinding> |
125 compositor_frame_sink_binding); | |
125 | 126 |
126 // The template-ized versions of the following methods rely on the presence | 127 // The template-ized versions of the following methods rely on the presence |
127 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. | 128 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. |
128 // Sets a shared property on the window which is sent to the window server and | 129 // Sets a shared property on the window which is sent to the window server and |
129 // shared with other clients that can view this window. | 130 // shared with other clients that can view this window. |
130 template <typename T> | 131 template <typename T> |
131 void SetSharedProperty(const std::string& name, const T& data); | 132 void SetSharedProperty(const std::string& name, const T& data); |
132 // Gets a shared property set on the window. The property must exist. Call | 133 // Gets a shared property set on the window. The property must exist. Call |
133 // HasSharedProperty() before calling. | 134 // HasSharedProperty() before calling. |
134 template <typename T> | 135 template <typename T> |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 std::map<const void*, Value> prop_map_; | 407 std::map<const void*, Value> prop_map_; |
407 | 408 |
408 std::unique_ptr<SurfaceInfo> surface_info_; | 409 std::unique_ptr<SurfaceInfo> surface_info_; |
409 | 410 |
410 DISALLOW_COPY_AND_ASSIGN(Window); | 411 DISALLOW_COPY_AND_ASSIGN(Window); |
411 }; | 412 }; |
412 | 413 |
413 } // namespace ui | 414 } // namespace ui |
414 | 415 |
415 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 416 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
OLD | NEW |