| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // A type is used to identify a class of Windows and customize behavior such | 57 // A type is used to identify a class of Windows and customize behavior such |
| 58 // as event handling and parenting. This field should only be consumed by the | 58 // as event handling and parenting. This field should only be consumed by the |
| 59 // shell -- Aura itself shouldn't contain type-specific logic. | 59 // shell -- Aura itself shouldn't contain type-specific logic. |
| 60 WindowType type() const { return type_; } | 60 WindowType type() const { return type_; } |
| 61 void SetType(WindowType type); | 61 void SetType(WindowType type); |
| 62 | 62 |
| 63 int id() const { return id_; } | 63 int id() const { return id_; } |
| 64 void set_id(int id) { id_ = id; } | 64 void set_id(int id) { id_ = id; } |
| 65 | 65 |
| 66 const std::string& name() const { return name_; } | 66 const std::string& name() const { return name_; } |
| 67 void SetName(const std::string& name); | 67 void set_name(const std::string& name) { name_ = name; } |
| 68 | 68 |
| 69 const string16 title() const { return title_; } | 69 const string16 title() const { return title_; } |
| 70 void set_title(const string16& title) { title_ = title; } | 70 void set_title(const string16& title) { title_ = title; } |
| 71 | 71 |
| 72 ui::Layer* layer() { return layer_.get(); } | 72 ui::Layer* layer() { return layer_.get(); } |
| 73 const ui::Layer* layer() const { return layer_.get(); } | 73 const ui::Layer* layer() const { return layer_.get(); } |
| 74 | 74 |
| 75 WindowDelegate* delegate() { return delegate_; } | 75 WindowDelegate* delegate() { return delegate_; } |
| 76 | 76 |
| 77 const gfx::Rect& bounds() const; | 77 const gfx::Rect& bounds() const; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 // Called when this window's parent has changed. | 291 // Called when this window's parent has changed. |
| 292 void OnParentChanged(); | 292 void OnParentChanged(); |
| 293 | 293 |
| 294 // Called when this window's stacking order among its siblings is changed. | 294 // Called when this window's stacking order among its siblings is changed. |
| 295 void OnStackingChanged(); | 295 void OnStackingChanged(); |
| 296 | 296 |
| 297 // Overridden from ui::LayerDelegate: | 297 // Overridden from ui::LayerDelegate: |
| 298 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; | 298 virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| 299 | 299 |
| 300 // Updates the layer name with a name based on the window's name and id. | |
| 301 void UpdateLayerName(const std::string& name); | |
| 302 | |
| 303 WindowType type_; | 300 WindowType type_; |
| 304 | 301 |
| 305 WindowDelegate* delegate_; | 302 WindowDelegate* delegate_; |
| 306 | 303 |
| 307 scoped_ptr<ui::Layer> layer_; | 304 scoped_ptr<ui::Layer> layer_; |
| 308 | 305 |
| 309 // The Window's parent. | 306 // The Window's parent. |
| 310 Window* parent_; | 307 Window* parent_; |
| 311 | 308 |
| 312 // Child windows. Topmost is last. | 309 // Child windows. Topmost is last. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 342 // TODO(oshima): Consolidcate ViewProp and aura::window property | 339 // TODO(oshima): Consolidcate ViewProp and aura::window property |
| 343 // implementation. | 340 // implementation. |
| 344 std::map<const char*, void*> prop_map_; | 341 std::map<const char*, void*> prop_map_; |
| 345 | 342 |
| 346 DISALLOW_COPY_AND_ASSIGN(Window); | 343 DISALLOW_COPY_AND_ASSIGN(Window); |
| 347 }; | 344 }; |
| 348 | 345 |
| 349 } // namespace aura | 346 } // namespace aura |
| 350 | 347 |
| 351 #endif // UI_AURA_WINDOW_H_ | 348 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |