| 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 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 int id() const { return id_; } | 101 int id() const { return id_; } |
| 102 void set_id(int id) { id_ = id; } | 102 void set_id(int id) { id_ = id; } |
| 103 | 103 |
| 104 const std::string& GetName() const; | 104 const std::string& GetName() const; |
| 105 void SetName(const std::string& name); | 105 void SetName(const std::string& name); |
| 106 | 106 |
| 107 const base::string16& GetTitle() const; | 107 const base::string16& GetTitle() const; |
| 108 void SetTitle(const base::string16& title); | 108 void SetTitle(const base::string16& title); |
| 109 | 109 |
| 110 bool transparent() const { return transparent_; } | 110 bool transparent() const { return transparent_; } |
| 111 |
| 112 // Note: Setting a window transparent has significant performance impact, |
| 113 // especially on low-end Chrome OS devices. Please ensure you are not |
| 114 // adding unnecessary overdraw. When in doubt, talk to the graphics team. |
| 111 void SetTransparent(bool transparent); | 115 void SetTransparent(bool transparent); |
| 112 | 116 |
| 113 // See description in Layer::SetFillsBoundsCompletely. | 117 // See description in Layer::SetFillsBoundsCompletely. |
| 114 void SetFillsBoundsCompletely(bool fills_bounds); | 118 void SetFillsBoundsCompletely(bool fills_bounds); |
| 115 | 119 |
| 116 WindowDelegate* delegate() { return delegate_; } | 120 WindowDelegate* delegate() { return delegate_; } |
| 117 const WindowDelegate* delegate() const { return delegate_; } | 121 const WindowDelegate* delegate() const { return delegate_; } |
| 118 | 122 |
| 119 const gfx::Rect& bounds() const { return bounds_; } | 123 const gfx::Rect& bounds() const { return bounds_; } |
| 120 | 124 |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 // Child windows. Topmost is last. | 470 // Child windows. Topmost is last. |
| 467 Windows children_; | 471 Windows children_; |
| 468 | 472 |
| 469 // The visibility state of the window as set by Show()/Hide(). This may differ | 473 // The visibility state of the window as set by Show()/Hide(). This may differ |
| 470 // from the visibility of the underlying layer, which may remain visible after | 474 // from the visibility of the underlying layer, which may remain visible after |
| 471 // the window is hidden (e.g. to animate its disappearance). | 475 // the window is hidden (e.g. to animate its disappearance). |
| 472 bool visible_; | 476 bool visible_; |
| 473 | 477 |
| 474 int id_; | 478 int id_; |
| 475 | 479 |
| 476 // Whether layer is initialized as non-opaque. | 480 // Whether layer is initialized as non-opaque. Defaults to false. |
| 477 bool transparent_; | 481 bool transparent_; |
| 478 | 482 |
| 479 std::unique_ptr<LayoutManager> layout_manager_; | 483 std::unique_ptr<LayoutManager> layout_manager_; |
| 480 std::unique_ptr<ui::EventTargeter> targeter_; | 484 std::unique_ptr<ui::EventTargeter> targeter_; |
| 481 | 485 |
| 482 // Makes the window pass all events through to any windows behind it. | 486 // Makes the window pass all events through to any windows behind it. |
| 483 bool ignore_events_; | 487 bool ignore_events_; |
| 484 | 488 |
| 485 // See set_hit_test_bounds_override_inner(). | 489 // See set_hit_test_bounds_override_inner(). |
| 486 gfx::Insets hit_test_bounds_override_inner_; | 490 gfx::Insets hit_test_bounds_override_inner_; |
| 487 | 491 |
| 488 base::ObserverList<WindowObserver, true> observers_; | 492 base::ObserverList<WindowObserver, true> observers_; |
| 489 | 493 |
| 490 DISALLOW_COPY_AND_ASSIGN(Window); | 494 DISALLOW_COPY_AND_ASSIGN(Window); |
| 491 }; | 495 }; |
| 492 | 496 |
| 493 } // namespace aura | 497 } // namespace aura |
| 494 | 498 |
| 495 #endif // UI_AURA_WINDOW_H_ | 499 #endif // UI_AURA_WINDOW_H_ |
| OLD | NEW |