summaryrefslogtreecommitdiffstats
path: root/chrome/browser/notifications/notification_prefs_manager.h
blob: 9bb1be24e0630e9a2307c2f17aaa5a8bef06cf8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_
#define CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_

#include "chrome/browser/notifications/balloon_collection.h"

class PrefService;
class PrefRegistrySimple;

// This interface is used to access and mutate the preferences related to
// desktop notifications.
class NotificationPrefsManager {
 public:
  explicit NotificationPrefsManager(PrefService* prefs);
  virtual ~NotificationPrefsManager() {}

  // Registers preferences.
  static void RegisterPrefs(PrefRegistrySimple* registry);

  // Gets the preference indicating where notifications should be placed.
  virtual BalloonCollection::PositionPreference
      GetPositionPreference() const = 0;

  // Sets the preference that indicates where notifications should
  // be placed on the screen.
  virtual void SetPositionPreference(
      BalloonCollection::PositionPreference preference) = 0;

 protected:
  NotificationPrefsManager() {}

 private:
  DISALLOW_COPY_AND_ASSIGN(NotificationPrefsManager);
};

#endif  // CHROME_BROWSER_NOTIFICATIONS_NOTIFICATION_PREFS_MANAGER_H_