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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual void OnBalloonClosed(Balloon* source) OVERRIDE; | 58 virtual void OnBalloonClosed(Balloon* source) OVERRIDE; |
59 virtual const Balloons& GetActiveBalloons() OVERRIDE; | 59 virtual const Balloons& GetActiveBalloons() OVERRIDE; |
60 | 60 |
61 // content::NotificationObserver interface. | 61 // content::NotificationObserver interface. |
62 virtual void Observe(int type, | 62 virtual void Observe(int type, |
63 const content::NotificationSource& source, | 63 const content::NotificationSource& source, |
64 const content::NotificationDetails& details) OVERRIDE; | 64 const content::NotificationDetails& details) OVERRIDE; |
65 | 65 |
66 // MessageLoopForUI::Observer interface. | 66 // MessageLoopForUI::Observer interface. |
67 #if defined(OS_WIN) || defined(USE_AURA) | 67 #if defined(OS_WIN) || defined(USE_AURA) |
68 virtual base::EventStatus WillProcessEvent( | 68 virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE; |
69 const base::NativeEvent& event) OVERRIDE; | |
70 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; | 69 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; |
71 #elif defined(TOOLKIT_GTK) | 70 #elif defined(TOOLKIT_GTK) |
72 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; | 71 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE; |
73 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; | 72 virtual void DidProcessEvent(GdkEvent* event) OVERRIDE; |
74 #endif | 73 #endif |
75 | 74 |
76 // base_ is embedded, so this is a simple accessor for the number of | 75 // base_ is embedded, so this is a simple accessor for the number of |
77 // balloons in the collection. | 76 // balloons in the collection. |
78 int count() const { return base_.count(); } | 77 int count() const { return base_.count(); } |
79 | 78 |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 base::WeakPtrFactory<BalloonCollectionImpl> reposition_factory_; | 238 base::WeakPtrFactory<BalloonCollectionImpl> reposition_factory_; |
240 | 239 |
241 // Is the balloon collection currently listening for UI events? | 240 // Is the balloon collection currently listening for UI events? |
242 bool added_as_message_loop_observer_; | 241 bool added_as_message_loop_observer_; |
243 #endif | 242 #endif |
244 | 243 |
245 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); | 244 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); |
246 }; | 245 }; |
247 | 246 |
248 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 247 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
OLD | NEW |