| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 void AddTransientWindow(Window* transient_window); | 178 void AddTransientWindow(Window* transient_window); |
| 179 void RemoveTransientWindow(Window* transient_window); | 179 void RemoveTransientWindow(Window* transient_window); |
| 180 | 180 |
| 181 // TODO(fsamuel): Figure out if we want to refactor transient window | 181 // TODO(fsamuel): Figure out if we want to refactor transient window |
| 182 // management into a separate class. | 182 // management into a separate class. |
| 183 // Transient tree. | 183 // Transient tree. |
| 184 Window* transient_parent() { return transient_parent_; } | 184 Window* transient_parent() { return transient_parent_; } |
| 185 const Window* transient_parent() const { return transient_parent_; } | 185 const Window* transient_parent() const { return transient_parent_; } |
| 186 const Children& transient_children() const { return transient_children_; } | 186 const Children& transient_children() const { return transient_children_; } |
| 187 | 187 |
| 188 void SetModal(); |
| 189 bool is_modal() const { return is_modal_; } |
| 190 |
| 188 Window* GetChildById(Id id); | 191 Window* GetChildById(Id id); |
| 189 | 192 |
| 190 void SetTextInputState(mojo::TextInputStatePtr state); | 193 void SetTextInputState(mojo::TextInputStatePtr state); |
| 191 void SetImeVisibility(bool visible, mojo::TextInputStatePtr state); | 194 void SetImeVisibility(bool visible, mojo::TextInputStatePtr state); |
| 192 | 195 |
| 193 bool HasCapture() const; | 196 bool HasCapture() const; |
| 194 void SetCapture(); | 197 void SetCapture(); |
| 195 void ReleaseCapture(); | 198 void ReleaseCapture(); |
| 196 | 199 |
| 197 // Focus. | 200 // Focus. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 int64_t value, | 239 int64_t value, |
| 237 int64_t default_value); | 240 int64_t default_value); |
| 238 int64_t GetLocalPropertyInternal(const void* key, | 241 int64_t GetLocalPropertyInternal(const void* key, |
| 239 int64_t default_value) const; | 242 int64_t default_value) const; |
| 240 | 243 |
| 241 void LocalDestroy(); | 244 void LocalDestroy(); |
| 242 void LocalAddChild(Window* child); | 245 void LocalAddChild(Window* child); |
| 243 void LocalRemoveChild(Window* child); | 246 void LocalRemoveChild(Window* child); |
| 244 void LocalAddTransientWindow(Window* transient_window); | 247 void LocalAddTransientWindow(Window* transient_window); |
| 245 void LocalRemoveTransientWindow(Window* transient_window); | 248 void LocalRemoveTransientWindow(Window* transient_window); |
| 249 void LocalSetModal(); |
| 246 // Returns true if the order actually changed. | 250 // Returns true if the order actually changed. |
| 247 bool LocalReorder(Window* relative, mojom::OrderDirection direction); | 251 bool LocalReorder(Window* relative, mojom::OrderDirection direction); |
| 248 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); | 252 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); |
| 249 void LocalSetClientArea( | 253 void LocalSetClientArea( |
| 250 const gfx::Insets& new_client_area, | 254 const gfx::Insets& new_client_area, |
| 251 const std::vector<gfx::Rect>& additional_client_areas); | 255 const std::vector<gfx::Rect>& additional_client_areas); |
| 252 void LocalSetViewportMetrics(const mojom::ViewportMetrics& old_metrics, | 256 void LocalSetViewportMetrics(const mojom::ViewportMetrics& old_metrics, |
| 253 const mojom::ViewportMetrics& new_metrics); | 257 const mojom::ViewportMetrics& new_metrics); |
| 254 void LocalSetDrawn(bool drawn); | 258 void LocalSetDrawn(bool drawn); |
| 255 void LocalSetVisible(bool visible); | 259 void LocalSetVisible(bool visible); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 294 |
| 291 WindowTreeConnection* connection_; | 295 WindowTreeConnection* connection_; |
| 292 Id id_; | 296 Id id_; |
| 293 Window* parent_; | 297 Window* parent_; |
| 294 Children children_; | 298 Children children_; |
| 295 | 299 |
| 296 Window* stacking_target_; | 300 Window* stacking_target_; |
| 297 Window* transient_parent_; | 301 Window* transient_parent_; |
| 298 Children transient_children_; | 302 Children transient_children_; |
| 299 | 303 |
| 304 bool is_modal_; |
| 305 |
| 300 base::ObserverList<WindowObserver> observers_; | 306 base::ObserverList<WindowObserver> observers_; |
| 301 InputEventHandler* input_event_handler_; | 307 InputEventHandler* input_event_handler_; |
| 302 | 308 |
| 303 gfx::Rect bounds_; | 309 gfx::Rect bounds_; |
| 304 gfx::Insets client_area_; | 310 gfx::Insets client_area_; |
| 305 std::vector<gfx::Rect> additional_client_areas_; | 311 std::vector<gfx::Rect> additional_client_areas_; |
| 306 | 312 |
| 307 mojom::ViewportMetricsPtr viewport_metrics_; | 313 mojom::ViewportMetricsPtr viewport_metrics_; |
| 308 | 314 |
| 309 bool visible_; | 315 bool visible_; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 327 }; | 333 }; |
| 328 | 334 |
| 329 std::map<const void*, Value> prop_map_; | 335 std::map<const void*, Value> prop_map_; |
| 330 | 336 |
| 331 DISALLOW_COPY_AND_ASSIGN(Window); | 337 DISALLOW_COPY_AND_ASSIGN(Window); |
| 332 }; | 338 }; |
| 333 | 339 |
| 334 } // namespace mus | 340 } // namespace mus |
| 335 | 341 |
| 336 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 342 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |