OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_ |
| 6 #define ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "ui/views/widget/widget_observer.h" |
| 10 |
| 11 namespace views { |
| 12 class TrayBubbleView; |
| 13 } |
| 14 |
| 15 namespace ash { |
| 16 class TrayBackgroundView; |
| 17 class TrayEventFilter; |
| 18 |
| 19 // Creates and manages the Widget and EventFilter components of a bubble. |
| 20 |
| 21 class TrayBubbleWrapper : public views::WidgetObserver { |
| 22 public: |
| 23 TrayBubbleWrapper(TrayBackgroundView* tray, |
| 24 views::TrayBubbleView* bubble_view); |
| 25 ~TrayBubbleWrapper() override; |
| 26 |
| 27 // views::WidgetObserver overrides: |
| 28 void OnWidgetDestroying(views::Widget* widget) override; |
| 29 void OnWidgetBoundsChanged(views::Widget* widget, |
| 30 const gfx::Rect& new_bounds) override; |
| 31 |
| 32 const TrayBackgroundView* tray() const { return tray_; } |
| 33 TrayBackgroundView* tray() { return tray_; } |
| 34 const views::TrayBubbleView* bubble_view() const { return bubble_view_; } |
| 35 const views::Widget* bubble_widget() const { return bubble_widget_; } |
| 36 |
| 37 private: |
| 38 TrayBackgroundView* tray_; |
| 39 views::TrayBubbleView* bubble_view_; // unowned |
| 40 views::Widget* bubble_widget_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(TrayBubbleWrapper); |
| 43 }; |
| 44 |
| 45 } // namespace ash |
| 46 |
| 47 #endif // ASH_SYSTEM_TRAY_TRAY_BUBBLE_WRAPPER_H_ |
OLD | NEW |