| 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 // Handles the visible notification (or balloons). | 5 // Handles the visible notification (or balloons). |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ | 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ |
| 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ | 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ui/gfx/point.h" | 12 #include "ui/gfx/point.h" |
| 13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
| 14 #include "ui/gfx/size.h" | 14 #include "ui/gfx/size.h" |
| 15 | 15 |
| 16 class Balloon; | 16 class Balloon; |
| 17 class BalloonCollection; | 17 class BalloonCollection; |
| 18 class BalloonHost; | 18 class BalloonHost; |
| 19 class Notification; | 19 class Notification; |
| 20 class Profile; | 20 class Profile; |
| 21 | 21 |
| 22 // Interface for a view that displays a balloon. | 22 // Interface for a view that displays a balloon. |
| 23 class BalloonView { | 23 class BalloonView { |
| 24 public: | 24 public: |
| 25 virtual ~BalloonView() { } | 25 virtual ~BalloonView() {} |
| 26 | 26 |
| 27 // Show the view on the screen. | 27 // Show the view on the screen. |
| 28 virtual void Show(Balloon* balloon) = 0; | 28 virtual void Show(Balloon* balloon) = 0; |
| 29 | 29 |
| 30 // Notify that the content of notification has chagned. | 30 // Notify that the content of notification has chagned. |
| 31 virtual void Update() = 0; | 31 virtual void Update() = 0; |
| 32 | 32 |
| 33 // Reposition the view to match the position of its balloon. | 33 // Reposition the view to match the position of its balloon. |
| 34 virtual void RepositionToBalloon() = 0; | 34 virtual void RepositionToBalloon() = 0; |
| 35 | 35 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // position for keeping the close buttons under the mouse cursor. | 125 // position for keeping the close buttons under the mouse cursor. |
| 126 gfx::Point offset_; | 126 gfx::Point offset_; |
| 127 | 127 |
| 128 // Smallest size for this balloon where scrollbars will be shown. | 128 // Smallest size for this balloon where scrollbars will be shown. |
| 129 gfx::Size min_scrollbar_size_; | 129 gfx::Size min_scrollbar_size_; |
| 130 | 130 |
| 131 DISALLOW_COPY_AND_ASSIGN(Balloon); | 131 DISALLOW_COPY_AND_ASSIGN(Balloon); |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ | 134 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ |
| OLD | NEW |