| 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 // 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 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #if USE_OFFSETS | 39 #if USE_OFFSETS |
| 40 , public MessageLoopForUI::Observer | 40 , public MessageLoopForUI::Observer |
| 41 #endif | 41 #endif |
| 42 { | 42 { |
| 43 public: | 43 public: |
| 44 BalloonCollectionImpl(); | 44 BalloonCollectionImpl(); |
| 45 virtual ~BalloonCollectionImpl(); | 45 virtual ~BalloonCollectionImpl(); |
| 46 | 46 |
| 47 // BalloonCollection interface. | 47 // BalloonCollection interface. |
| 48 virtual void Add(const Notification& notification, | 48 virtual void Add(const Notification& notification, |
| 49 Profile* profile); | 49 Profile* profile) OVERRIDE; |
| 50 virtual bool RemoveById(const std::string& id); | 50 virtual bool RemoveById(const std::string& id) OVERRIDE; |
| 51 virtual bool RemoveBySourceOrigin(const GURL& source_origin); | 51 virtual bool RemoveBySourceOrigin(const GURL& source_origin) OVERRIDE; |
| 52 virtual void RemoveAll(); | 52 virtual void RemoveAll() OVERRIDE; |
| 53 virtual bool HasSpace() const; | 53 virtual bool HasSpace() const OVERRIDE; |
| 54 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size); | 54 virtual void ResizeBalloon(Balloon* balloon, const gfx::Size& size) OVERRIDE; |
| 55 virtual void SetPositionPreference(PositionPreference position); | 55 virtual void SetPositionPreference(PositionPreference position) OVERRIDE; |
| 56 virtual void DisplayChanged(); | 56 virtual void DisplayChanged() OVERRIDE; |
| 57 virtual void OnBalloonClosed(Balloon* source); | 57 virtual void OnBalloonClosed(Balloon* source) OVERRIDE; |
| 58 virtual const Balloons& GetActiveBalloons(); | 58 virtual const Balloons& GetActiveBalloons() OVERRIDE; |
| 59 | 59 |
| 60 // content::NotificationObserver interface. | 60 // content::NotificationObserver interface. |
| 61 virtual void Observe(int type, | 61 virtual void Observe(int type, |
| 62 const content::NotificationSource& source, | 62 const content::NotificationSource& source, |
| 63 const content::NotificationDetails& details) OVERRIDE; | 63 const content::NotificationDetails& details) OVERRIDE; |
| 64 | 64 |
| 65 // MessageLoopForUI::Observer interface. | 65 // MessageLoopForUI::Observer interface. |
| 66 #if defined(OS_WIN) || defined(TOUCH_UI) || defined(USE_AURA) | 66 #if defined(OS_WIN) || defined(TOUCH_UI) || defined(USE_AURA) |
| 67 virtual base::EventStatus WillProcessEvent( | 67 virtual base::EventStatus WillProcessEvent( |
| 68 const base::NativeEvent& event) OVERRIDE; | 68 const base::NativeEvent& event) OVERRIDE; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 base::WeakPtrFactory<BalloonCollectionImpl> reposition_factory_; | 212 base::WeakPtrFactory<BalloonCollectionImpl> reposition_factory_; |
| 213 | 213 |
| 214 // Is the balloon collection currently listening for UI events? | 214 // Is the balloon collection currently listening for UI events? |
| 215 bool added_as_message_loop_observer_; | 215 bool added_as_message_loop_observer_; |
| 216 #endif | 216 #endif |
| 217 | 217 |
| 218 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); | 218 DISALLOW_COPY_AND_ASSIGN(BalloonCollectionImpl); |
| 219 }; | 219 }; |
| 220 | 220 |
| 221 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ | 221 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_COLLECTION_IMPL_H_ |
| OLD | NEW |