| 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 // Draws the view for the balloons. | 5 // Draws the view for the balloons. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ | 7 #ifndef CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ |
| 8 #define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ | 8 #define CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // A balloon view is the UI component for a desktop notification toasts. | 45 // A balloon view is the UI component for a desktop notification toasts. |
| 46 // It draws a border, and within the border an HTML renderer. | 46 // It draws a border, and within the border an HTML renderer. |
| 47 class BalloonViewImpl : public BalloonView, | 47 class BalloonViewImpl : public BalloonView, |
| 48 public views::ViewMenuDelegate, | 48 public views::ViewMenuDelegate, |
| 49 public views::WidgetDelegateView, | 49 public views::WidgetDelegateView, |
| 50 public views::ButtonListener, | 50 public views::ButtonListener, |
| 51 public NotificationObserver, | 51 public NotificationObserver, |
| 52 public ui::AnimationDelegate { | 52 public ui::AnimationDelegate { |
| 53 public: | 53 public: |
| 54 explicit BalloonViewImpl(BalloonCollection* collection); | 54 explicit BalloonViewImpl(BalloonCollection* collection); |
| 55 ~BalloonViewImpl(); | 55 virtual ~BalloonViewImpl(); |
| 56 | 56 |
| 57 // BalloonView interface. | 57 // BalloonView interface. |
| 58 virtual void Show(Balloon* balloon) OVERRIDE; | 58 virtual void Show(Balloon* balloon) OVERRIDE; |
| 59 virtual void Update() OVERRIDE; | 59 virtual void Update() OVERRIDE; |
| 60 virtual void RepositionToBalloon() OVERRIDE; | 60 virtual void RepositionToBalloon() OVERRIDE; |
| 61 virtual void Close(bool by_user) OVERRIDE; | 61 virtual void Close(bool by_user) OVERRIDE; |
| 62 virtual gfx::Size GetSize() const OVERRIDE; | 62 virtual gfx::Size GetSize() const OVERRIDE; |
| 63 virtual BalloonHost* GetHost() const OVERRIDE; | 63 virtual BalloonHost* GetHost() const OVERRIDE; |
| 64 | 64 |
| 65 private: | 65 private: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_; | 161 scoped_ptr<NotificationOptionsMenuModel> options_menu_model_; |
| 162 scoped_ptr<views::Menu2> options_menu_menu_; | 162 scoped_ptr<views::Menu2> options_menu_menu_; |
| 163 views::MenuButton* options_menu_button_; | 163 views::MenuButton* options_menu_button_; |
| 164 | 164 |
| 165 NotificationRegistrar notification_registrar_; | 165 NotificationRegistrar notification_registrar_; |
| 166 | 166 |
| 167 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl); | 167 DISALLOW_COPY_AND_ASSIGN(BalloonViewImpl); |
| 168 }; | 168 }; |
| 169 | 169 |
| 170 #endif // CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ | 170 #endif // CHROME_BROWSER_UI_VIEWS_NOTIFICATIONS_BALLOON_VIEW_H_ |
| OLD | NEW |