| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 MASH_WM_PROPERTY_UTIL_H_ | 5 #ifndef MASH_WM_PROPERTY_UTIL_H_ |
| 6 #define MASH_WM_PROPERTY_UTIL_H_ | 6 #define MASH_WM_PROPERTY_UTIL_H_ |
| 7 | 7 |
| 8 #include "components/mus/public/cpp/window.h" | 8 #include "components/mus/public/cpp/window.h" |
| 9 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" | 9 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" |
| 10 #include "mash/wm/public/interfaces/container.mojom.h" | 10 #include "mash/wm/public/interfaces/container.mojom.h" |
| 11 | 11 |
| 12 namespace gfx { | 12 namespace gfx { |
| 13 class Rect; | 13 class Rect; |
| 14 class Size; | 14 class Size; |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace mus { | 17 namespace mus { |
| 18 class Window; | 18 class Window; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace mash { | 21 namespace mash { |
| 22 namespace wm { | 22 namespace wm { |
| 23 | 23 |
| 24 class Shadow; | 24 class Shadow; |
| 25 | 25 |
| 26 // Utility functions to read values from properties & convert them to the | 26 // Utility functions to read values from properties & convert them to the |
| 27 // appropriate types. | 27 // appropriate types. |
| 28 | 28 |
| 29 void SetWindowShowState(mus::Window* window, mus::mojom::ShowState show_state); |
| 29 mus::mojom::ShowState GetWindowShowState(const mus::Window* window); | 30 mus::mojom::ShowState GetWindowShowState(const mus::Window* window); |
| 30 | 31 |
| 31 void SetWindowUserSetBounds(mus::Window* window, const gfx::Rect& bounds); | 32 void SetWindowUserSetBounds(mus::Window* window, const gfx::Rect& bounds); |
| 32 gfx::Rect GetWindowUserSetBounds(const mus::Window* window); | 33 gfx::Rect GetWindowUserSetBounds(const mus::Window* window); |
| 33 | 34 |
| 34 void SetWindowPreferredSize(mus::Window* window, const gfx::Size& size); | 35 void SetWindowPreferredSize(mus::Window* window, const gfx::Size& size); |
| 35 gfx::Size GetWindowPreferredSize(const mus::Window* window); | 36 gfx::Size GetWindowPreferredSize(const mus::Window* window); |
| 36 | 37 |
| 37 mojom::Container GetRequestedContainer(const mus::Window* window); | 38 mojom::Container GetRequestedContainer(const mus::Window* window); |
| 38 | 39 |
| 39 // Returns a bitfield of kResizeBehavior* values from | 40 // Returns a bitfield of kResizeBehavior* values from |
| 40 // window_manager_constants.mojom. | 41 // window_manager_constants.mojom. |
| 41 int32_t GetResizeBehavior(const mus::Window* window); | 42 int32_t GetResizeBehavior(const mus::Window* window); |
| 42 | 43 |
| 43 void SetRestoreBounds(mus::Window* window, const gfx::Rect& bounds); | 44 void SetRestoreBounds(mus::Window* window, const gfx::Rect& bounds); |
| 44 gfx::Rect GetRestoreBounds(const mus::Window* window); | 45 gfx::Rect GetRestoreBounds(const mus::Window* window); |
| 45 | 46 |
| 46 void SetShadow(mus::Window* window, Shadow* shadow); | 47 void SetShadow(mus::Window* window, Shadow* shadow); |
| 47 Shadow* GetShadow(mus::Window* window); | 48 Shadow* GetShadow(const mus::Window* window); |
| 48 | 49 |
| 49 mus::mojom::WindowType GetWindowType(mus::Window* window); | 50 mus::mojom::WindowType GetWindowType(const mus::Window* window); |
| 50 mus::mojom::WindowType GetWindowType( | 51 mus::mojom::WindowType GetWindowType( |
| 51 const mus::Window::SharedProperties& window); | 52 const mus::Window::SharedProperties& window); |
| 52 | 53 |
| 54 base::string16 GetWindowTitle(const mus::Window* window); |
| 55 |
| 53 } // namespace wm | 56 } // namespace wm |
| 54 } // namespace mash | 57 } // namespace mash |
| 55 | 58 |
| 56 #endif // MASH_WM_PROPERTY_UTIL_H_ | 59 #endif // MASH_WM_PROPERTY_UTIL_H_ |
| OLD | NEW |