Chromium Code Reviews| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 | 71 |
| 72 // Changes the visibility of the window. | 72 // Changes the visibility of the window. |
| 73 void SetVisibility(Visibility visibility); | 73 void SetVisibility(Visibility visibility); |
| 74 Visibility visibility() const { return visibility_; } | 74 Visibility visibility() const { return visibility_; } |
| 75 | 75 |
| 76 // Assigns a LayoutManager to size and place child windows. | 76 // Assigns a LayoutManager to size and place child windows. |
| 77 // The Window takes ownership of the LayoutManager. | 77 // The Window takes ownership of the LayoutManager. |
| 78 void SetLayoutManager(LayoutManager* layout_manager); | 78 void SetLayoutManager(LayoutManager* layout_manager); |
| 79 | 79 |
| 80 // Changes the bounds of the window. | 80 // Changes the bounds of the window. |
| 81 void SetBounds(const gfx::Rect& bounds, int anim_ms); | 81 void SetBounds(const gfx::Rect& new_bounds, int anim_ms); |
|
Ben Goodger (Google)
2011/09/27 22:38:04
Make a SetBoundsAnimated that takes anim_ms and ha
| |
| 82 const gfx::Rect& bounds() const { return bounds_; } | 82 const gfx::Rect& bounds() const; |
| 83 | 83 |
| 84 // Marks the a portion of window as needing to be painted. | 84 // Marks the a portion of window as needing to be painted. |
| 85 void SchedulePaintInRect(const gfx::Rect& rect); | 85 void SchedulePaintInRect(const gfx::Rect& rect); |
| 86 | 86 |
| 87 // Sets the contents of the window. | 87 // Sets the contents of the window. |
| 88 void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin); | 88 void SetCanvas(const SkCanvas& canvas, const gfx::Point& origin); |
| 89 | 89 |
| 90 // Sets the parent window of the window. If NULL, the window is parented to | 90 // Sets the parent window of the window. If NULL, the window is parented to |
| 91 // the desktop's window. | 91 // the desktop's window. |
| 92 void SetParent(Window* parent); | 92 void SetParent(Window* parent); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 | 161 |
| 162 // Overridden from ui::LayerDelegate: | 162 // Overridden from ui::LayerDelegate: |
| 163 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 163 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 164 | 164 |
| 165 WindowDelegate* delegate_; | 165 WindowDelegate* delegate_; |
| 166 | 166 |
| 167 Visibility visibility_; | 167 Visibility visibility_; |
| 168 | 168 |
| 169 scoped_ptr<ui::Layer> layer_; | 169 scoped_ptr<ui::Layer> layer_; |
| 170 | 170 |
| 171 // Bounds of the window in the desktop's coordinate system. | |
| 172 gfx::Rect bounds_; | |
| 173 | |
| 174 // The Window's parent. | 171 // The Window's parent. |
| 175 // TODO(beng): Implement NULL-ness for toplevels. | 172 // TODO(beng): Implement NULL-ness for toplevels. |
| 176 Window* parent_; | 173 Window* parent_; |
| 177 | 174 |
| 178 // Child windows. Topmost is last. | 175 // Child windows. Topmost is last. |
| 179 Windows children_; | 176 Windows children_; |
| 180 | 177 |
| 181 int id_; | 178 int id_; |
| 182 string16 name_; | 179 string16 name_; |
| 183 | 180 |
| 184 scoped_ptr<EventFilter> event_filter_; | 181 scoped_ptr<EventFilter> event_filter_; |
| 185 scoped_ptr<LayoutManager> layout_manager_; | 182 scoped_ptr<LayoutManager> layout_manager_; |
| 186 | 183 |
| 187 void* user_data_; | 184 void* user_data_; |
| 188 | 185 |
| 189 DISALLOW_COPY_AND_ASSIGN(Window); | 186 DISALLOW_COPY_AND_ASSIGN(Window); |
| 190 }; | 187 }; |
| 191 | 188 |
| 192 } // namespace aura | 189 } // namespace aura |
| 193 | 190 |
| 194 #endif // UI_AURA_WINDOW_H_ | 191 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |