| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // Releases the Window's owning reference to its layer, and returns it. | 105 // Releases the Window's owning reference to its layer, and returns it. |
| 106 // This is used when you need to animate the presentation of the Window just | 106 // This is used when you need to animate the presentation of the Window just |
| 107 // prior to destroying it. The window can be destroyed soon after calling this | 107 // prior to destroying it. The window can be destroyed soon after calling this |
| 108 // function, and the caller is then responsible for disposing of the layer | 108 // function, and the caller is then responsible for disposing of the layer |
| 109 // once any animation completes. Note that layer() will remain valid until the | 109 // once any animation completes. Note that layer() will remain valid until the |
| 110 // end of ~Window(). | 110 // end of ~Window(). |
| 111 ui::Layer* AcquireLayer(); | 111 ui::Layer* AcquireLayer(); |
| 112 | 112 |
| 113 WindowDelegate* delegate() { return delegate_; } | 113 WindowDelegate* delegate() { return delegate_; } |
| 114 | 114 |
| 115 // TODO(oshima): Rename this to GetBounds(). | 115 const gfx::Rect& bounds() const; |
| 116 gfx::Rect bounds() const; | |
| 117 | 116 |
| 118 Window* parent() { return parent_; } | 117 Window* parent() { return parent_; } |
| 119 const Window* parent() const { return parent_; } | 118 const Window* parent() const { return parent_; } |
| 120 | 119 |
| 121 // Returns the RootWindow that contains this Window or NULL if the Window is | 120 // Returns the RootWindow that contains this Window or NULL if the Window is |
| 122 // not contained by a RootWindow. | 121 // not contained by a RootWindow. |
| 123 virtual RootWindow* GetRootWindow(); | 122 virtual RootWindow* GetRootWindow(); |
| 124 virtual const RootWindow* GetRootWindow() const; | 123 virtual const RootWindow* GetRootWindow() const; |
| 125 | 124 |
| 126 // The Window does not own this object. | 125 // The Window does not own this object. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 137 // whether Show() without a Hide() has been invoked. | 136 // whether Show() without a Hide() has been invoked. |
| 138 bool TargetVisibility() const { return visible_; } | 137 bool TargetVisibility() const { return visible_; } |
| 139 | 138 |
| 140 // Returns the window's bounds in screen coordinates. In ash, this is | 139 // Returns the window's bounds in screen coordinates. In ash, this is |
| 141 // effectively screen bounds. | 140 // effectively screen bounds. |
| 142 // | 141 // |
| 143 // TODO(oshima): Fix this to return screen's coordinate for multi-monitor | 142 // TODO(oshima): Fix this to return screen's coordinate for multi-monitor |
| 144 // support. | 143 // support. |
| 145 gfx::Rect GetBoundsInRootWindow() const; | 144 gfx::Rect GetBoundsInRootWindow() const; |
| 146 | 145 |
| 147 // Returns the bounds in pixel coordinates. | |
| 148 const gfx::Rect& GetBoundsInPixel() const; | |
| 149 | |
| 150 virtual void SetTransform(const ui::Transform& transform); | 146 virtual void SetTransform(const ui::Transform& transform); |
| 151 | 147 |
| 152 // Assigns a LayoutManager to size and place child windows. | 148 // Assigns a LayoutManager to size and place child windows. |
| 153 // The Window takes ownership of the LayoutManager. | 149 // The Window takes ownership of the LayoutManager. |
| 154 void SetLayoutManager(LayoutManager* layout_manager); | 150 void SetLayoutManager(LayoutManager* layout_manager); |
| 155 LayoutManager* layout_manager() { return layout_manager_.get(); } | 151 LayoutManager* layout_manager() { return layout_manager_.get(); } |
| 156 | 152 |
| 157 // 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 |
| 158 // LayoutManager may adjust the bounds. | 154 // LayoutManager may adjust the bounds. |
| 159 void SetBounds(const gfx::Rect& new_bounds); | 155 void SetBounds(const gfx::Rect& new_bounds); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 }; | 472 }; |
| 477 | 473 |
| 478 std::map<const void*, Value> prop_map_; | 474 std::map<const void*, Value> prop_map_; |
| 479 | 475 |
| 480 DISALLOW_COPY_AND_ASSIGN(Window); | 476 DISALLOW_COPY_AND_ASSIGN(Window); |
| 481 }; | 477 }; |
| 482 | 478 |
| 483 } // namespace aura | 479 } // namespace aura |
| 484 | 480 |
| 485 #endif // UI_AURA_WINDOW_H_ | 481 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |