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_COLLECTION_IMPL_H_ | 7 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 8 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
9 | 9 |
10 #include <deque> | 10 #include <deque> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 virtual void SetPositionPreference(PositionPreference position) OVERRIDE; | 44 virtual void SetPositionPreference(PositionPreference position) OVERRIDE; |
45 virtual void DisplayChanged() OVERRIDE; | 45 virtual void DisplayChanged() OVERRIDE; |
46 virtual void OnBalloonClosed(Balloon* source) OVERRIDE; | 46 virtual void OnBalloonClosed(Balloon* source) OVERRIDE; |
47 virtual const Balloons& GetActiveBalloons() OVERRIDE; | 47 virtual const Balloons& GetActiveBalloons() OVERRIDE; |
48 | 48 |
49 // content::NotificationObserver interface. | 49 // content::NotificationObserver interface. |
50 virtual void Observe(int type, | 50 virtual void Observe(int type, |
51 const content::NotificationSource& source, | 51 const content::NotificationSource& source, |
52 const content::NotificationDetails& details) OVERRIDE; | 52 const content::NotificationDetails& details) OVERRIDE; |
53 | 53 |
54 // MessageLoopForUI::Observer interface. | |
55 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; | |
56 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; | |
57 | |
58 // base_ is embedded, so this is a simple accessor for the number of | 54 // base_ is embedded, so this is a simple accessor for the number of |
59 // balloons in the collection. | 55 // balloons in the collection. |
60 int count() const { return base_.count(); } | 56 int count() const { return base_.count(); } |
61 | 57 |
62 static int min_balloon_width() { return Layout::min_balloon_width(); } | 58 static int min_balloon_width() { return Layout::min_balloon_width(); } |
63 static int max_balloon_width() { return Layout::max_balloon_width(); } | 59 static int max_balloon_width() { return Layout::max_balloon_width(); } |
64 static int min_balloon_height() { return Layout::min_balloon_height(); } | 60 static int min_balloon_height() { return Layout::min_balloon_height(); } |
65 static int max_balloon_height() { return Layout::max_balloon_height(); } | 61 static int max_balloon_height() { return Layout::max_balloon_height(); } |
66 | 62 |
67 protected: | 63 protected: |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // Factory for generating delayed reposition tasks on mouse motion. | 210 // Factory for generating delayed reposition tasks on mouse motion. |
215 base::WeakPtrFactory<BalloonCollectionImpl> reposition_factory_; | 211 base::WeakPtrFactory<BalloonCollectionImpl> reposition_factory_; |
216 | 212 |
217 // Is the balloon collection currently listening for UI events? | 213 // Is the balloon collection currently listening for UI events? |
218 bool added_as_message_loop_observer_; | 214 bool added_as_message_loop_observer_; |
219 | 215 |
220 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); | 216 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); |
221 }; | 217 }; |
222 | 218 |
223 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 219 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
OLD | NEW |