| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace gfx { | 23 namespace gfx { |
| 24 class Size; | 24 class Size; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace mus { | 27 namespace mus { |
| 28 | 28 |
| 29 class ServiceProviderImpl; | 29 class ServiceProviderImpl; |
| 30 class WindowObserver; | 30 class WindowObserver; |
| 31 class WindowSurface; | 31 class WindowSurface; |
| 32 class WindowSurfaceBinding; |
| 32 class WindowTreeClientImpl; | 33 class WindowTreeClientImpl; |
| 33 class WindowTreeConnection; | 34 class WindowTreeConnection; |
| 34 | 35 |
| 35 namespace { | 36 namespace { |
| 36 class OrderChangedNotifier; | 37 class OrderChangedNotifier; |
| 37 } | 38 } |
| 38 | 39 |
| 39 // Defined in window_property.h (which we do not include) | 40 // Defined in window_property.h (which we do not include) |
| 40 template <typename T> | 41 template <typename T> |
| 41 struct WindowProperty; | 42 struct WindowProperty; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // A Window is drawn if the Window and all its ancestors are visible and the | 81 // A Window is drawn if the Window and all its ancestors are visible and the |
| 81 // Window is attached to the root. | 82 // Window is attached to the root. |
| 82 bool IsDrawn() const; | 83 bool IsDrawn() const; |
| 83 | 84 |
| 84 const mojom::ViewportMetrics& viewport_metrics() { | 85 const mojom::ViewportMetrics& viewport_metrics() { |
| 85 return *viewport_metrics_; | 86 return *viewport_metrics_; |
| 86 } | 87 } |
| 87 | 88 |
| 88 scoped_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type); | 89 scoped_ptr<WindowSurface> RequestSurface(mojom::SurfaceType type); |
| 89 | 90 |
| 91 void AttachSurface(mojom::SurfaceType type, |
| 92 scoped_ptr<WindowSurfaceBinding> surface_binding); |
| 93 |
| 90 // The template-ized versions of the following methods rely on the presence | 94 // The template-ized versions of the following methods rely on the presence |
| 91 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. | 95 // of a mojo::TypeConverter<const std::vector<uint8_t>, T>. |
| 92 // Sets a shared property on the window which is sent to the window server and | 96 // Sets a shared property on the window which is sent to the window server and |
| 93 // shared with other clients that can view this window. | 97 // shared with other clients that can view this window. |
| 94 template <typename T> | 98 template <typename T> |
| 95 void SetSharedProperty(const std::string& name, const T& data); | 99 void SetSharedProperty(const std::string& name, const T& data); |
| 96 // Gets a shared property set on the window. The property must exist. Call | 100 // Gets a shared property set on the window. The property must exist. Call |
| 97 // HasSharedProperty() before calling. | 101 // HasSharedProperty() before calling. |
| 98 template <typename T> | 102 template <typename T> |
| 99 T GetSharedProperty(const std::string& name) const; | 103 T GetSharedProperty(const std::string& name) const; |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 }; | 293 }; |
| 290 | 294 |
| 291 std::map<const void*, Value> prop_map_; | 295 std::map<const void*, Value> prop_map_; |
| 292 | 296 |
| 293 MOJO_DISALLOW_COPY_AND_ASSIGN(Window); | 297 MOJO_DISALLOW_COPY_AND_ASSIGN(Window); |
| 294 }; | 298 }; |
| 295 | 299 |
| 296 } // namespace mus | 300 } // namespace mus |
| 297 | 301 |
| 298 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 302 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |