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" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 // Close the view. | 36 // Close the view. |
37 virtual void Close(bool by_user) = 0; | 37 virtual void Close(bool by_user) = 0; |
38 | 38 |
39 // The total size of the view. | 39 // The total size of the view. |
40 virtual gfx::Size GetSize() const = 0; | 40 virtual gfx::Size GetSize() const = 0; |
41 | 41 |
42 // The host for the view's contents. May be NULL if an implementation does | 42 // The host for the view's contents. May be NULL if an implementation does |
43 // not have a host associated with it (i.e. does not do html rendering). | 43 // not have a host associated with it (i.e. does not do html rendering). |
44 virtual BalloonHost* GetHost() const = 0; | 44 virtual BalloonHost* GetHost() const = 0; |
| 45 |
| 46 // Returns the horizontal margin the content is inset by. |
| 47 static int GetHorizontalMargin(); |
45 }; | 48 }; |
46 | 49 |
47 // Represents a Notification on the screen. | 50 // Represents a Notification on the screen. |
48 class Balloon { | 51 class Balloon { |
49 public: | 52 public: |
50 Balloon(const Notification& notification, | 53 Balloon(const Notification& notification, |
51 Profile* profile, | 54 Profile* profile, |
52 BalloonCollection* collection); | 55 BalloonCollection* collection); |
53 virtual ~Balloon(); | 56 virtual ~Balloon(); |
54 | 57 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 // position for keeping the close buttons under the mouse cursor. | 128 // position for keeping the close buttons under the mouse cursor. |
126 gfx::Point offset_; | 129 gfx::Point offset_; |
127 | 130 |
128 // Smallest size for this balloon where scrollbars will be shown. | 131 // Smallest size for this balloon where scrollbars will be shown. |
129 gfx::Size min_scrollbar_size_; | 132 gfx::Size min_scrollbar_size_; |
130 | 133 |
131 DISALLOW_COPY_AND_ASSIGN(Balloon); | 134 DISALLOW_COPY_AND_ASSIGN(Balloon); |
132 }; | 135 }; |
133 | 136 |
134 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ | 137 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_H_ |
OLD | NEW |