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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 // The Window does not own this object. | 117 // The Window does not own this object. |
118 void set_user_data(void* user_data) { user_data_ = user_data; } | 118 void set_user_data(void* user_data) { user_data_ = user_data; } |
119 void* user_data() const { return user_data_; } | 119 void* user_data() const { return user_data_; } |
120 | 120 |
121 // Changes the visibility of the window. | 121 // Changes the visibility of the window. |
122 void Show(); | 122 void Show(); |
123 void Hide(); | 123 void Hide(); |
124 // Returns true if this window and all its ancestors are visible. | 124 // Returns true if this window and all its ancestors are visible. |
125 bool IsVisible() const; | 125 bool IsVisible() const; |
| 126 // Returns the visibility requested by this window. IsVisible() takes into |
| 127 // account the visibility of the layer and ancestors, where as this tracks |
| 128 // whether Show() without a Hide() has been invoked. |
| 129 bool TargetVisibility() const { return visible_; } |
126 | 130 |
127 // Returns the window's bounds in screen coordinates. | 131 // Returns the window's bounds in screen coordinates. |
128 gfx::Rect GetScreenBounds() const; | 132 gfx::Rect GetScreenBounds() const; |
129 | 133 |
130 virtual void SetTransform(const ui::Transform& transform); | 134 virtual void SetTransform(const ui::Transform& transform); |
131 | 135 |
132 // Assigns a LayoutManager to size and place child windows. | 136 // Assigns a LayoutManager to size and place child windows. |
133 // The Window takes ownership of the LayoutManager. | 137 // The Window takes ownership of the LayoutManager. |
134 void SetLayoutManager(LayoutManager* layout_manager); | 138 void SetLayoutManager(LayoutManager* layout_manager); |
135 LayoutManager* layout_manager() { return layout_manager_.get(); } | 139 LayoutManager* layout_manager() { return layout_manager_.get(); } |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 ObserverList<WindowObserver> observers_; | 414 ObserverList<WindowObserver> observers_; |
411 | 415 |
412 std::map<const void*, intptr_t> prop_map_; | 416 std::map<const void*, intptr_t> prop_map_; |
413 | 417 |
414 DISALLOW_COPY_AND_ASSIGN(Window); | 418 DISALLOW_COPY_AND_ASSIGN(Window); |
415 }; | 419 }; |
416 | 420 |
417 } // namespace aura | 421 } // namespace aura |
418 | 422 |
419 #endif // UI_AURA_WINDOW_H_ | 423 #endif // UI_AURA_WINDOW_H_ |
OLD | NEW |