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 ASH_MUS_PROPERTY_UTIL_H_ | 5 #ifndef ASH_MUS_PROPERTY_UTIL_H_ |
6 #define ASH_MUS_PROPERTY_UTIL_H_ | 6 #define ASH_MUS_PROPERTY_UTIL_H_ |
7 | 7 |
8 #include "ash/public/interfaces/ash_window_type.mojom.h" | 8 #include "ash/public/interfaces/ash_window_type.mojom.h" |
9 #include "ash/public/interfaces/container.mojom.h" | |
10 #include "services/ui/public/cpp/window.h" | 9 #include "services/ui/public/cpp/window.h" |
11 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 10 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
12 #include "ui/wm/public/window_types.h" | 11 #include "ui/wm/public/window_types.h" |
13 | 12 |
14 namespace gfx { | 13 namespace gfx { |
15 class Rect; | 14 class Rect; |
16 class Size; | 15 class Size; |
17 } | 16 } |
18 | 17 |
19 namespace ui { | 18 namespace ui { |
(...skipping 10 matching lines...) Expand all Loading... |
30 | 29 |
31 void SetWindowShowState(ui::Window* window, ui::mojom::ShowState show_state); | 30 void SetWindowShowState(ui::Window* window, ui::mojom::ShowState show_state); |
32 ui::mojom::ShowState GetWindowShowState(const ui::Window* window); | 31 ui::mojom::ShowState GetWindowShowState(const ui::Window* window); |
33 | 32 |
34 void SetWindowUserSetBounds(ui::Window* window, const gfx::Rect& bounds); | 33 void SetWindowUserSetBounds(ui::Window* window, const gfx::Rect& bounds); |
35 gfx::Rect GetWindowUserSetBounds(const ui::Window* window); | 34 gfx::Rect GetWindowUserSetBounds(const ui::Window* window); |
36 | 35 |
37 void SetWindowPreferredSize(ui::Window* window, const gfx::Size& size); | 36 void SetWindowPreferredSize(ui::Window* window, const gfx::Size& size); |
38 gfx::Size GetWindowPreferredSize(const ui::Window* window); | 37 gfx::Size GetWindowPreferredSize(const ui::Window* window); |
39 | 38 |
40 // If |window| has the |kWindowContainer_Property| set as a property, then | 39 // If |window| has the |kInitialContainerId_Property| set as a property, then |
41 // the value of |kWindowContainer_Property| is set in |container| and true is | 40 // the value of |kInitialContainerId_Property| is set in |container_id| and true |
42 // returned. Otherwise false is returned. | 41 // is returned. Otherwise false is returned. |
43 bool GetRequestedContainer(const ui::Window* window, | 42 bool GetRequestedContainer(const ui::Window* window, int* container_id); |
44 mojom::Container* container); | |
45 | 43 |
46 // Returns a bitfield of kResizeBehavior* values from | 44 // Returns a bitfield of kResizeBehavior* values from |
47 // window_manager_constants.mojom. | 45 // window_manager_constants.mojom. |
48 void SetResizeBehavior(ui::Window::SharedProperties* properties, | 46 void SetResizeBehavior(ui::Window::SharedProperties* properties, |
49 int32_t resize_behavior); | 47 int32_t resize_behavior); |
50 int32_t GetResizeBehavior(const ui::Window* window); | 48 int32_t GetResizeBehavior(const ui::Window* window); |
51 | 49 |
52 void SetRestoreBounds(ui::Window* window, const gfx::Rect& bounds); | 50 void SetRestoreBounds(ui::Window* window, const gfx::Rect& bounds); |
53 gfx::Rect GetRestoreBounds(const ui::Window* window); | 51 gfx::Rect GetRestoreBounds(const ui::Window* window); |
54 | 52 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Manipulates the kExcludeFromMru_Property property. | 89 // Manipulates the kExcludeFromMru_Property property. |
92 void SetExcludeFromMru(ui::Window* window, bool value); | 90 void SetExcludeFromMru(ui::Window* window, bool value); |
93 | 91 |
94 // Returns true if the property is set and true, otherwise false. | 92 // Returns true if the property is set and true, otherwise false. |
95 bool GetExcludeFromMru(const ui::Window* window); | 93 bool GetExcludeFromMru(const ui::Window* window); |
96 | 94 |
97 } // namespace mus | 95 } // namespace mus |
98 } // namespace ash | 96 } // namespace ash |
99 | 97 |
100 #endif // ASH_MUS_PROPERTY_UTIL_H_ | 98 #endif // ASH_MUS_PROPERTY_UTIL_H_ |
OLD | NEW |