| 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 COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void SetPredefinedCursor(mus::mojom::Cursor cursor_id); | 98 void SetPredefinedCursor(mus::mojom::Cursor cursor_id); |
| 99 | 99 |
| 100 // A Window is drawn if the Window and all its ancestors are visible and the | 100 // A Window is drawn if the Window and all its ancestors are visible and the |
| 101 // Window is attached to the root. | 101 // Window is attached to the root. |
| 102 bool IsDrawn() const; | 102 bool IsDrawn() const; |
| 103 | 103 |
| 104 const mojom::ViewportMetrics& viewport_metrics() { | 104 const mojom::ViewportMetrics& viewport_metrics() { |
| 105 return *viewport_metrics_; | 105 return *viewport_metrics_; |
| 106 } | 106 } |
| 107 | 107 |
| 108 scoped_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type); | 108 std::unique_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type); |
| 109 | 109 |
| 110 void AttachSurface(mojom::SurfaceType type, | 110 void AttachSurface(mojom::SurfaceType type, |
| 111 scoped_ptr<WindowSurfaceBinding> surface_binding); | 111 std::unique_ptr<WindowSurfaceBinding> surface_binding); |
| 112 | 112 |
| 113 // The template-ized versions of the following methods rely on the presence | 113 // The template-ized versions of the following methods rely on the presence |
| 114 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. | 114 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. |
| 115 // Sets a shared property on the window which is sent to the window server and | 115 // Sets a shared property on the window which is sent to the window server and |
| 116 // shared with other clients that can view this window. | 116 // shared with other clients that can view this window. |
| 117 template <typename T> | 117 template <typename T> |
| 118 void SetSharedProperty(const std::string& name, const T& data); | 118 void SetSharedProperty(const std::string& name, const T& data); |
| 119 // Gets a shared property set on the window. The property must exist. Call | 119 // Gets a shared property set on the window. The property must exist. Call |
| 120 // HasSharedProperty() before calling. | 120 // HasSharedProperty() before calling. |
| 121 template <typename T> | 121 template <typename T> |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 }; | 345 }; |
| 346 | 346 |
| 347 std::map<const void*, Value> prop_map_; | 347 std::map<const void*, Value> prop_map_; |
| 348 | 348 |
| 349 DISALLOW_COPY_AND_ASSIGN(Window); | 349 DISALLOW_COPY_AND_ASSIGN(Window); |
| 350 }; | 350 }; |
| 351 | 351 |
| 352 } // namespace mus | 352 } // namespace mus |
| 353 | 353 |
| 354 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 354 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |