summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extension_prefs_observer.h
blob: ff836810e7ee350ca21a9f0e6c271f31fce4355f (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
40
41
// Copyright 2014 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 EXTENSIONS_BROWSER_EXTENSION_PREFS_OBSERVER_H_
#define EXTENSIONS_BROWSER_EXTENSION_PREFS_OBSERVER_H_

#include <string>

#include "base/time/time.h"

namespace extensions {

class ExtensionPrefs;

class ExtensionPrefsObserver {
 public:
  // Called when the reasons for an extension being disabled have changed.
  virtual void OnExtensionDisableReasonsChanged(const std::string& extension_id,
                                                int disabled_reasons) {}

  // Called when an extension is registered with ExtensionPrefs.
  virtual void OnExtensionRegistered(const std::string& extension_id,
                                     const base::Time& install_time,
                                     bool is_enabled) {}

  // Called when an extension's prefs have been loaded.
  virtual void OnExtensionPrefsLoaded(const std::string& extension_id,
                                      const ExtensionPrefs* prefs) {}

  // Called when an extension's prefs are deleted.
  virtual void OnExtensionPrefsDeleted(const std::string& extension_id) {}

  // Called when an extension's enabled state pref is changed.
  virtual void OnExtensionStateChanged(const std::string& extension_id,
                                       bool state) {}
};

}  // namespace extensions

#endif  // EXTENSIONS_BROWSER_EXTENSION_PREFS_OBSERVER_H_