| 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_NOTIFICATION_UI_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_BALLOON_NOTIFICATION_UI_MANAGER_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_NOTIFICATION_UI_MANAGER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_BALLOON_NOTIFICATION_UI_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public BalloonCollection::BalloonSpaceChangeListener { | 27 public BalloonCollection::BalloonSpaceChangeListener { |
| 28 public: | 28 public: |
| 29 explicit BalloonNotificationUIManager(PrefService* local_state); | 29 explicit BalloonNotificationUIManager(PrefService* local_state); |
| 30 virtual ~BalloonNotificationUIManager(); | 30 virtual ~BalloonNotificationUIManager(); |
| 31 | 31 |
| 32 // Initializes the UI manager with a balloon collection; this object | 32 // Initializes the UI manager with a balloon collection; this object |
| 33 // takes ownership of the balloon collection. | 33 // takes ownership of the balloon collection. |
| 34 void SetBalloonCollection(BalloonCollection* balloon_collection); | 34 void SetBalloonCollection(BalloonCollection* balloon_collection); |
| 35 | 35 |
| 36 // NotificationUIManager: | 36 // NotificationUIManager: |
| 37 virtual bool DoesIdExist(const std::string& notification_id) OVERRIDE; | 37 virtual const Notification* FindById( |
| 38 const std::string& notification_id) const OVERRIDE; |
| 38 virtual bool CancelById(const std::string& notification_id) OVERRIDE; | 39 virtual bool CancelById(const std::string& notification_id) OVERRIDE; |
| 39 virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin( | 40 virtual std::set<std::string> GetAllIdsByProfileAndSourceOrigin( |
| 40 Profile* profile, | 41 Profile* profile, |
| 41 const GURL& source) OVERRIDE; | 42 const GURL& source) OVERRIDE; |
| 42 virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE; | 43 virtual bool CancelAllBySourceOrigin(const GURL& source_origin) OVERRIDE; |
| 43 virtual bool CancelAllByProfile(Profile* profile) OVERRIDE; | 44 virtual bool CancelAllByProfile(Profile* profile) OVERRIDE; |
| 44 virtual void CancelAll() OVERRIDE; | 45 virtual void CancelAll() OVERRIDE; |
| 45 | 46 |
| 46 // NotificationUIManagerImpl: | 47 // NotificationUIManagerImpl: |
| 47 virtual bool ShowNotification(const Notification& notification, | 48 virtual bool ShowNotification(const Notification& notification, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 71 // An owned pointer to the collection of active balloons. | 72 // An owned pointer to the collection of active balloons. |
| 72 scoped_ptr<BalloonCollection> balloon_collection_; | 73 scoped_ptr<BalloonCollection> balloon_collection_; |
| 73 | 74 |
| 74 // Prefs listener for the position preference. | 75 // Prefs listener for the position preference. |
| 75 IntegerPrefMember position_pref_; | 76 IntegerPrefMember position_pref_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(BalloonNotificationUIManager); | 78 DISALLOW_COPY_AND_ASSIGN(BalloonNotificationUIManager); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_NOTIFICATION_UI_MANAGER_H_ | 81 #endif // CHROME_BROWSER_NOTIFICATIONS_BALLOON_NOTIFICATION_UI_MANAGER_H_ |
| OLD | NEW |