Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: ios/chrome/browser/prefs/pref_observer_bridge.h

Issue 1090413007: [iOS] Upstream observer bridges (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: D'oh! Add new files Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/prefs/pref_observer_bridge.h
diff --git a/ios/chrome/browser/prefs/pref_observer_bridge.h b/ios/chrome/browser/prefs/pref_observer_bridge.h
new file mode 100644
index 0000000000000000000000000000000000000000..4e105467165e18b74f985a2a32d35797ff34e54f
--- /dev/null
+++ b/ios/chrome/browser/prefs/pref_observer_bridge.h
@@ -0,0 +1,32 @@
+// Copyright 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 IOS_CHROME_BROWSER_PREFS_PREF_OBSERVER_BRIDGE_H_
+#define IOS_CHROME_BROWSER_PREFS_PREF_OBSERVER_BRIDGE_H_
+
+#include <string>
+
+#include "base/compiler_specific.h"
+
+class PrefChangeRegistrar;
+
+@protocol PrefObserverDelegate
+- (void)onPreferenceChanged:(const std::string&)preferenceName;
+@end
+
+class PrefObserverBridge {
+ public:
+ explicit PrefObserverBridge(id<PrefObserverDelegate> delegate);
+ virtual ~PrefObserverBridge();
+
+ virtual void ObserveChangesForPreference(const std::string& pref_name,
+ PrefChangeRegistrar* registrar);
+
+ private:
+ virtual void OnPreferenceChanged(const std::string& pref_name);
+
+ id<PrefObserverDelegate> delegate_;
+};
+
+#endif // IOS_CHROME_BROWSER_PREFS_PREF_OBSERVER_BRIDGE_H_

Powered by Google App Engine
This is Rietveld 408576698