| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 void LocalRemoveTransientWindow(Window* transient_window); | 246 void LocalRemoveTransientWindow(Window* transient_window); |
| 247 void LocalSetModal(); | 247 void LocalSetModal(); |
| 248 // Returns true if the order actually changed. | 248 // Returns true if the order actually changed. |
| 249 bool LocalReorder(Window* relative, mojom::OrderDirection direction); | 249 bool LocalReorder(Window* relative, mojom::OrderDirection direction); |
| 250 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); | 250 void LocalSetBounds(const gfx::Rect& old_bounds, const gfx::Rect& new_bounds); |
| 251 void LocalSetClientArea( | 251 void LocalSetClientArea( |
| 252 const gfx::Insets& new_client_area, | 252 const gfx::Insets& new_client_area, |
| 253 const std::vector<gfx::Rect>& additional_client_areas); | 253 const std::vector<gfx::Rect>& additional_client_areas); |
| 254 void LocalSetViewportMetrics(const mojom::ViewportMetrics& old_metrics, | 254 void LocalSetViewportMetrics(const mojom::ViewportMetrics& old_metrics, |
| 255 const mojom::ViewportMetrics& new_metrics); | 255 const mojom::ViewportMetrics& new_metrics); |
| 256 void LocalSetDrawn(bool drawn); | 256 void LocalSetParentDrawn(bool drawn); |
| 257 void LocalSetVisible(bool visible); | 257 void LocalSetVisible(bool visible); |
| 258 void LocalSetPredefinedCursor(mojom::Cursor cursor_id); | 258 void LocalSetPredefinedCursor(mojom::Cursor cursor_id); |
| 259 void LocalSetSharedProperty(const std::string& name, | 259 void LocalSetSharedProperty(const std::string& name, |
| 260 const std::vector<uint8_t>* data); | 260 const std::vector<uint8_t>* data); |
| 261 | 261 |
| 262 // Notifies this winodw that its stacking position has changed. | 262 // Notifies this winodw that its stacking position has changed. |
| 263 void NotifyWindowStackingChanged(); | 263 void NotifyWindowStackingChanged(); |
| 264 // Methods implementing visibility change notifications. See WindowObserver | 264 // Methods implementing visibility change notifications. See WindowObserver |
| 265 // for more details. | 265 // for more details. |
| 266 void NotifyWindowVisibilityChanged(Window* target); | 266 void NotifyWindowVisibilityChanged(Window* target); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 std::vector<gfx::Rect> additional_client_areas_; | 309 std::vector<gfx::Rect> additional_client_areas_; |
| 310 | 310 |
| 311 mojom::ViewportMetricsPtr viewport_metrics_; | 311 mojom::ViewportMetricsPtr viewport_metrics_; |
| 312 | 312 |
| 313 bool visible_; | 313 bool visible_; |
| 314 | 314 |
| 315 mojom::Cursor cursor_id_; | 315 mojom::Cursor cursor_id_; |
| 316 | 316 |
| 317 SharedProperties properties_; | 317 SharedProperties properties_; |
| 318 | 318 |
| 319 // Drawn state is derived from the visible state and the parent's visible | 319 // Drawn state of our parent. This is only meaningful for root Windows, in |
| 320 // state. This field is only used if the window has no parent (eg it's a | 320 // which the parent Window isn't exposed to the client. |
| 321 // root). | 321 bool parent_drawn_; |
| 322 bool drawn_; | |
| 323 | 322 |
| 324 // Value struct to keep the name and deallocator for this property. | 323 // Value struct to keep the name and deallocator for this property. |
| 325 // Key cannot be used for this purpose because it can be char* or | 324 // Key cannot be used for this purpose because it can be char* or |
| 326 // WindowProperty<>. | 325 // WindowProperty<>. |
| 327 struct Value { | 326 struct Value { |
| 328 const char* name; | 327 const char* name; |
| 329 int64_t value; | 328 int64_t value; |
| 330 PropertyDeallocator deallocator; | 329 PropertyDeallocator deallocator; |
| 331 }; | 330 }; |
| 332 | 331 |
| 333 std::map<const void*, Value> prop_map_; | 332 std::map<const void*, Value> prop_map_; |
| 334 | 333 |
| 335 DISALLOW_COPY_AND_ASSIGN(Window); | 334 DISALLOW_COPY_AND_ASSIGN(Window); |
| 336 }; | 335 }; |
| 337 | 336 |
| 338 } // namespace mus | 337 } // namespace mus |
| 339 | 338 |
| 340 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ | 339 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ |
| OLD | NEW |