| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 UI_AURA_WINDOW_H_ | 5 #ifndef UI_AURA_WINDOW_H_ |
| 6 #define UI_AURA_WINDOW_H_ | 6 #define UI_AURA_WINDOW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 LayoutManager* layout_manager() { return layout_manager_.get(); } | 111 LayoutManager* layout_manager() { return layout_manager_.get(); } |
| 112 | 112 |
| 113 // Changes the bounds of the window. If present, the window's parent's | 113 // Changes the bounds of the window. If present, the window's parent's |
| 114 // LayoutManager may adjust the bounds. | 114 // LayoutManager may adjust the bounds. |
| 115 void SetBounds(const gfx::Rect& new_bounds); | 115 void SetBounds(const gfx::Rect& new_bounds); |
| 116 | 116 |
| 117 // Returns the target bounds of the window. If the window's layer is | 117 // Returns the target bounds of the window. If the window's layer is |
| 118 // not animating, it simply returns the current bounds. | 118 // not animating, it simply returns the current bounds. |
| 119 gfx::Rect GetTargetBounds() const; | 119 gfx::Rect GetTargetBounds() const; |
| 120 | 120 |
| 121 // Sets the minimum size of the window that a user can resize it to. | |
| 122 // A smaller size can still be set using SetBounds(). | |
| 123 void set_minimum_size(const gfx::Size& minimum_size) { | |
| 124 minimum_size_ = minimum_size; | |
| 125 } | |
| 126 const gfx::Size& minimum_size() const { return minimum_size_; } | |
| 127 | |
| 128 // Marks the a portion of window as needing to be painted. | 121 // Marks the a portion of window as needing to be painted. |
| 129 void SchedulePaintInRect(const gfx::Rect& rect); | 122 void SchedulePaintInRect(const gfx::Rect& rect); |
| 130 | 123 |
| 131 // Sets the contents of the window. | 124 // Sets the contents of the window. |
| 132 void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin); | 125 void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin); |
| 133 | 126 |
| 134 // Sets the parent window of the window. If NULL, the window is parented to | 127 // Sets the parent window of the window. If NULL, the window is parented to |
| 135 // the desktop's window. | 128 // the desktop's window. |
| 136 void SetParent(Window* parent); | 129 void SetParent(Window* parent); |
| 137 | 130 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 bool return_tightest, | 288 bool return_tightest, |
| 296 bool for_event_handling); | 289 bool for_event_handling); |
| 297 | 290 |
| 298 // Overridden from ui::LayerDelegate: | 291 // Overridden from ui::LayerDelegate: |
| 299 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 292 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 300 | 293 |
| 301 WindowType type_; | 294 WindowType type_; |
| 302 | 295 |
| 303 WindowDelegate* delegate_; | 296 WindowDelegate* delegate_; |
| 304 | 297 |
| 305 // The minimum size of the window a user can resize to. | |
| 306 gfx::Size minimum_size_; | |
| 307 | |
| 308 scoped_ptr<ui::Layer> layer_; | 298 scoped_ptr<ui::Layer> layer_; |
| 309 | 299 |
| 310 // The Window's parent. | 300 // The Window's parent. |
| 311 Window* parent_; | 301 Window* parent_; |
| 312 | 302 |
| 313 // Child windows. Topmost is last. | 303 // Child windows. Topmost is last. |
| 314 Windows children_; | 304 Windows children_; |
| 315 | 305 |
| 316 // Transient windows. | 306 // Transient windows. |
| 317 Windows transient_children_; | 307 Windows transient_children_; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 343 // TODO(oshima): Consolidcate ViewProp and aura::window property | 333 // TODO(oshima): Consolidcate ViewProp and aura::window property |
| 344 // implementation. | 334 // implementation. |
| 345 std::map<const char*, void*> prop_map_; | 335 std::map<const char*, void*> prop_map_; |
| 346 | 336 |
| 347 DISALLOW_COPY_AND_ASSIGN(Window); | 337 DISALLOW_COPY_AND_ASSIGN(Window); |
| 348 }; | 338 }; |
| 349 | 339 |
| 350 } // namespace aura | 340 } // namespace aura |
| 351 | 341 |
| 352 #endif // UI_AURA_WINDOW_H_ | 342 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |