pref_notifier.h 900 B

1234567891011121314151617181920212223242526
  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
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_PREFS_PREF_NOTIFIER_H_
  5. #define COMPONENTS_PREFS_PREF_NOTIFIER_H_
  6. #include <string>
  7. // Delegate interface used by PrefValueStore to notify its owner about changes
  8. // to the preference values.
  9. // TODO(mnissler, danno): Move this declaration to pref_value_store.h once we've
  10. // cleaned up all public uses of this interface.
  11. class PrefNotifier {
  12. public:
  13. virtual ~PrefNotifier() {}
  14. // Sends out a change notification for the preference identified by
  15. // |pref_name|.
  16. virtual void OnPreferenceChanged(const std::string& pref_name) = 0;
  17. // Broadcasts the intialization completed notification.
  18. virtual void OnInitializationCompleted(bool succeeded) = 0;
  19. };
  20. #endif // COMPONENTS_PREFS_PREF_NOTIFIER_H_