15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2011 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef BASE_PREFS_PREF_NOTIFIER_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define BASE_PREFS_PREF_NOTIFIER_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include <string> 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Delegate interface used by PrefValueStore to notify its owner about changes 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// to the preference values. 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// TODO(mnissler, danno): Move this declaration to pref_value_store.h once we've 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// cleaned up all public uses of this interface. 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class PrefNotifier { 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public: 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual ~PrefNotifier() {} 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Sends out a change notification for the preference identified by 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // |pref_name|. 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnPreferenceChanged(const std::string& pref_name) = 0; 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Broadcasts the intialization completed notification. 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) virtual void OnInitializationCompleted(bool succeeded) = 0; 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // BASE_PREFS_PREF_NOTIFIER_H_ 27