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_WS_SERVER_WINDOW_H_ | 5 #ifndef COMPONENTS_MUS_WS_SERVER_WINDOW_H_ |
6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_H_ | 6 #define COMPONENTS_MUS_WS_SERVER_WINDOW_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 void StackChildAtTop(ServerWindow* child); | 67 void StackChildAtTop(ServerWindow* child); |
68 | 68 |
69 const gfx::Rect& bounds() const { return bounds_; } | 69 const gfx::Rect& bounds() const { return bounds_; } |
70 // Sets the bounds. If the size changes this implicitly resets the client | 70 // Sets the bounds. If the size changes this implicitly resets the client |
71 // area to fill the whole bounds. | 71 // area to fill the whole bounds. |
72 void SetBounds(const gfx::Rect& bounds); | 72 void SetBounds(const gfx::Rect& bounds); |
73 | 73 |
74 const gfx::Insets& client_area() const { return client_area_; } | 74 const gfx::Insets& client_area() const { return client_area_; } |
75 void SetClientArea(const gfx::Insets& insets); | 75 void SetClientArea(const gfx::Insets& insets); |
76 | 76 |
77 int32_t cursor() const { return cursor_id_; } | |
78 | |
77 const ServerWindow* parent() const { return parent_; } | 79 const ServerWindow* parent() const { return parent_; } |
78 ServerWindow* parent() { return parent_; } | 80 ServerWindow* parent() { return parent_; } |
79 | 81 |
80 const ServerWindow* GetRoot() const; | 82 const ServerWindow* GetRoot() const; |
81 ServerWindow* GetRoot() { | 83 ServerWindow* GetRoot() { |
82 return const_cast<ServerWindow*>( | 84 return const_cast<ServerWindow*>( |
83 const_cast<const ServerWindow*>(this)->GetRoot()); | 85 const_cast<const ServerWindow*>(this)->GetRoot()); |
84 } | 86 } |
85 | 87 |
86 std::vector<const ServerWindow*> GetChildren() const; | 88 std::vector<const ServerWindow*> GetChildren() const; |
(...skipping 17 matching lines...) Expand all Loading... | |
104 bool Contains(const ServerWindow* window) const; | 106 bool Contains(const ServerWindow* window) const; |
105 | 107 |
106 // Returns the visibility requested by this window. IsDrawn() returns whether | 108 // Returns the visibility requested by this window. IsDrawn() returns whether |
107 // the window is actually visible on screen. | 109 // the window is actually visible on screen. |
108 bool visible() const { return visible_; } | 110 bool visible() const { return visible_; } |
109 void SetVisible(bool value); | 111 void SetVisible(bool value); |
110 | 112 |
111 float opacity() const { return opacity_; } | 113 float opacity() const { return opacity_; } |
112 void SetOpacity(float value); | 114 void SetOpacity(float value); |
113 | 115 |
116 void SetCursor(mus::mojom::Cursor cursor_id); | |
sky
2015/12/01 21:48:00
Name this consistently with the mojom, so either P
| |
117 | |
114 const gfx::Transform& transform() const { return transform_; } | 118 const gfx::Transform& transform() const { return transform_; } |
115 void SetTransform(const gfx::Transform& transform); | 119 void SetTransform(const gfx::Transform& transform); |
116 | 120 |
117 const std::map<std::string, std::vector<uint8_t>>& properties() const { | 121 const std::map<std::string, std::vector<uint8_t>>& properties() const { |
118 return properties_; | 122 return properties_; |
119 } | 123 } |
120 void SetProperty(const std::string& name, const std::vector<uint8_t>* value); | 124 void SetProperty(const std::string& name, const std::vector<uint8_t>* value); |
121 | 125 |
122 void SetTextInputState(const ui::TextInputState& state); | 126 void SetTextInputState(const ui::TextInputState& state); |
123 const ui::TextInputState& text_input_state() const { | 127 const ui::TextInputState& text_input_state() const { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 // If non-null we're actively restacking transient as the result of a | 178 // If non-null we're actively restacking transient as the result of a |
175 // transient ancestor changing. | 179 // transient ancestor changing. |
176 ServerWindow* stacking_target_; | 180 ServerWindow* stacking_target_; |
177 ServerWindow* transient_parent_; | 181 ServerWindow* transient_parent_; |
178 Windows transient_children_; | 182 Windows transient_children_; |
179 | 183 |
180 bool visible_; | 184 bool visible_; |
181 gfx::Rect bounds_; | 185 gfx::Rect bounds_; |
182 gfx::Insets client_area_; | 186 gfx::Insets client_area_; |
183 scoped_ptr<ServerWindowSurfaceManager> surface_manager_; | 187 scoped_ptr<ServerWindowSurfaceManager> surface_manager_; |
188 mojom::Cursor cursor_id_; | |
184 float opacity_; | 189 float opacity_; |
185 bool can_focus_; | 190 bool can_focus_; |
186 gfx::Transform transform_; | 191 gfx::Transform transform_; |
187 ui::TextInputState text_input_state_; | 192 ui::TextInputState text_input_state_; |
188 | 193 |
189 Properties properties_; | 194 Properties properties_; |
190 | 195 |
191 gfx::Vector2d underlay_offset_; | 196 gfx::Vector2d underlay_offset_; |
192 | 197 |
193 base::ObserverList<ServerWindowObserver> observers_; | 198 base::ObserverList<ServerWindowObserver> observers_; |
194 | 199 |
195 DISALLOW_COPY_AND_ASSIGN(ServerWindow); | 200 DISALLOW_COPY_AND_ASSIGN(ServerWindow); |
196 }; | 201 }; |
197 | 202 |
198 } // namespace ws | 203 } // namespace ws |
199 } // namespace mus | 204 } // namespace mus |
200 | 205 |
201 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_ | 206 #endif // COMPONENTS_MUS_WS_SERVER_WINDOW_H_ |
OLD | NEW |