| 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_NOTIFICATION_PREFS_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ |
| 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ | 6 #define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/notifications/balloon_collection.h" | 8 #include "chrome/browser/notifications/balloon_collection.h" |
| 9 | 9 |
| 10 class PrefServiceSimple; | 10 class PrefService; |
| 11 class PrefRegistrySimple; |
| 11 | 12 |
| 12 // This interface is used to access and mutate the preferences related to | 13 // This interface is used to access and mutate the preferences related to |
| 13 // desktop notifications. | 14 // desktop notifications. |
| 14 class NotificationPrefsManager { | 15 class NotificationPrefsManager { |
| 15 public: | 16 public: |
| 16 virtual ~NotificationPrefsManager() {} | 17 virtual ~NotificationPrefsManager() {} |
| 17 | 18 |
| 18 // Registers preferences. | 19 // Registers preferences. |
| 19 static void RegisterPrefs(PrefServiceSimple* prefs); | 20 static void RegisterPrefs(PrefService* prefs, PrefRegistrySimple* registry); |
| 20 | 21 |
| 21 // Gets the preference indicating where notifications should be placed. | 22 // Gets the preference indicating where notifications should be placed. |
| 22 virtual BalloonCollection::PositionPreference | 23 virtual BalloonCollection::PositionPreference |
| 23 GetPositionPreference() const = 0; | 24 GetPositionPreference() const = 0; |
| 24 | 25 |
| 25 // Sets the preference that indicates where notifications should | 26 // Sets the preference that indicates where notifications should |
| 26 // be placed on the screen. | 27 // be placed on the screen. |
| 27 virtual void SetPositionPreference( | 28 virtual void SetPositionPreference( |
| 28 BalloonCollection::PositionPreference preference) = 0; | 29 BalloonCollection::PositionPreference preference) = 0; |
| 29 | 30 |
| 30 protected: | 31 protected: |
| 31 NotificationPrefsManager() {} | 32 NotificationPrefsManager() {} |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 DISALLOW_COPY_AND_ASSIGN(NotificationPrefsManager); | 35 DISALLOW_COPY_AND_ASSIGN(NotificationPrefsManager); |
| 35 }; | 36 }; |
| 36 | 37 |
| 37 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ | 38 #endif // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_ |
| OLD | NEW |