| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 // Changes the visibility of the window. | 129 // Changes the visibility of the window. |
| 130 void Show(); | 130 void Show(); |
| 131 void Hide(); | 131 void Hide(); |
| 132 // Returns true if this window and all its ancestors are visible. | 132 // Returns true if this window and all its ancestors are visible. |
| 133 bool IsVisible() const; | 133 bool IsVisible() const; |
| 134 // Returns the visibility requested by this window. IsVisible() takes into | 134 // Returns the visibility requested by this window. IsVisible() takes into |
| 135 // account the visibility of the layer and ancestors, where as this tracks | 135 // account the visibility of the layer and ancestors, where as this tracks |
| 136 // whether Show() without a Hide() has been invoked. | 136 // whether Show() without a Hide() has been invoked. |
| 137 bool TargetVisibility() const { return visible_; } | 137 bool TargetVisibility() const { return visible_; } |
| 138 | 138 |
| 139 // Returns the window's bounds in screen coordinates. | 139 // Returns the window's bounds in screen coordinates. In ash, this is |
| 140 gfx::Rect GetScreenBounds() const; | 140 // effectively screen bounds. |
| 141 // |
| 142 // TODO(oshima): Fix this to return screen's coordinate for multi-monitor |
| 143 // support. |
| 144 gfx::Rect GetBoundsInRootWindow() const; |
| 141 | 145 |
| 142 virtual void SetTransform(const ui::Transform& transform); | 146 virtual void SetTransform(const ui::Transform& transform); |
| 143 | 147 |
| 144 // Assigns a LayoutManager to size and place child windows. | 148 // Assigns a LayoutManager to size and place child windows. |
| 145 // The Window takes ownership of the LayoutManager. | 149 // The Window takes ownership of the LayoutManager. |
| 146 void SetLayoutManager(LayoutManager* layout_manager); | 150 void SetLayoutManager(LayoutManager* layout_manager); |
| 147 LayoutManager* layout_manager() { return layout_manager_.get(); } | 151 LayoutManager* layout_manager() { return layout_manager_.get(); } |
| 148 | 152 |
| 149 // Changes the bounds of the window. If present, the window's parent's | 153 // Changes the bounds of the window. If present, the window's parent's |
| 150 // LayoutManager may adjust the bounds. | 154 // LayoutManager may adjust the bounds. |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 }; | 466 }; |
| 463 | 467 |
| 464 std::map<const void*, Value> prop_map_; | 468 std::map<const void*, Value> prop_map_; |
| 465 | 469 |
| 466 DISALLOW_COPY_AND_ASSIGN(Window); | 470 DISALLOW_COPY_AND_ASSIGN(Window); |
| 467 }; | 471 }; |
| 468 | 472 |
| 469 } // namespace aura | 473 } // namespace aura |
| 470 | 474 |
| 471 #endif // UI_AURA_WINDOW_H_ | 475 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |