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 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // Cursors | 106 // Cursors |
107 mojom::Cursor predefined_cursor() const { return cursor_id_; } | 107 mojom::Cursor predefined_cursor() const { return cursor_id_; } |
108 void SetPredefinedCursor(ui::mojom::Cursor cursor_id); | 108 void SetPredefinedCursor(ui::mojom::Cursor cursor_id); |
109 | 109 |
110 // A Window is drawn if the Window and all its ancestors are visible and the | 110 // A Window is drawn if the Window and all its ancestors are visible and the |
111 // Window is attached to the root. | 111 // Window is attached to the root. |
112 bool IsDrawn() const; | 112 bool IsDrawn() const; |
113 | 113 |
114 std::unique_ptr<WindowCompositorFrameSink> RequestCompositorFrameSink( | 114 std::unique_ptr<WindowCompositorFrameSink> RequestCompositorFrameSink( |
115 mojom::CompositorFrameSinkType type, | |
116 scoped_refptr<cc::ContextProvider> context_provider, | 115 scoped_refptr<cc::ContextProvider> context_provider, |
117 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); | 116 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager); |
118 | 117 |
119 void AttachCompositorFrameSink( | 118 void AttachCompositorFrameSink( |
120 mojom::CompositorFrameSinkType type, | |
121 std::unique_ptr<WindowCompositorFrameSinkBinding> | 119 std::unique_ptr<WindowCompositorFrameSinkBinding> |
122 compositor_frame_sink_binding); | 120 compositor_frame_sink_binding); |
123 | 121 |
124 // The template-ized versions of the following methods rely on the presence | 122 // The template-ized versions of the following methods rely on the presence |
125 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. | 123 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. |
126 // Sets a shared property on the window which is sent to the window server and | 124 // Sets a shared property on the window which is sent to the window server and |
127 // shared with other clients that can view this window. | 125 // shared with other clients that can view this window. |
128 template <typename T> | 126 template <typename T> |
129 void SetSharedProperty(const std::string& name, const T& data); | 127 void SetSharedProperty(const std::string& name, const T& data); |
130 // Gets a shared property set on the window. The property must exist. Call | 128 // Gets a shared property set on the window. The property must exist. Call |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 std::map<const void*, Value> prop_map_; | 397 std::map<const void*, Value> prop_map_; |
400 | 398 |
401 cc::SurfaceInfo surface_info_; | 399 cc::SurfaceInfo surface_info_; |
402 | 400 |
403 DISALLOW_COPY_AND_ASSIGN(Window); | 401 DISALLOW_COPY_AND_ASSIGN(Window); |
404 }; | 402 }; |
405 | 403 |
406 } // namespace ui | 404 } // namespace ui |
407 | 405 |
408 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ | 406 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_H_ |
OLD | NEW |