Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / ios / chrome / browser / prefs / pref_observer_bridge.h
blob4e105467165e18b74f985a2a32d35797ff34e54f
1 // Copyright 2012 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.
5 #ifndef IOS_CHROME_BROWSER_PREFS_PREF_OBSERVER_BRIDGE_H_
6 #define IOS_CHROME_BROWSER_PREFS_PREF_OBSERVER_BRIDGE_H_
8 #include <string>
10 #include "base/compiler_specific.h"
12 class PrefChangeRegistrar;
14 @protocol PrefObserverDelegate
15 - (void)onPreferenceChanged:(const std::string&)preferenceName;
16 @end
18 class PrefObserverBridge {
19 public:
20 explicit PrefObserverBridge(id<PrefObserverDelegate> delegate);
21 virtual ~PrefObserverBridge();
23 virtual void ObserveChangesForPreference(const std::string& pref_name,
24 PrefChangeRegistrar* registrar);
26 private:
27 virtual void OnPreferenceChanged(const std::string& pref_name);
29 id<PrefObserverDelegate> delegate_;
32 #endif // IOS_CHROME_BROWSER_PREFS_PREF_OBSERVER_BRIDGE_H_