| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Defines the Chrome Extensions Managed Mode API relevant classes to realize | 5 // Defines the Chrome Extensions Managed Mode API relevant classes to realize |
| 6 // the API as specified in the extension API JSON. | 6 // the API as specified in the extension API JSON. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_MANAGED_MODE_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_MANAGED_MODE_API_H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_MANAGED_MODE_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_MANAGED_MODE_API_H_ |
| 10 | 10 |
| 11 #include "base/prefs/public/pref_change_registrar.h" | 11 #include "base/prefs/public/pref_change_registrar.h" |
| 12 #include "base/prefs/public/pref_observer.h" | 12 #include "base/prefs/public/pref_observer.h" |
| 13 #include "chrome/browser/extensions/extension_function.h" | 13 #include "chrome/browser/extensions/extension_function.h" |
| 14 #include "content/public/browser/notification_observer.h" | 14 #include "content/public/browser/notification_observer.h" |
| 15 | 15 |
| 16 class Profile; | 16 class Profile; |
| 17 | 17 |
| 18 namespace extensions { | 18 namespace extensions { |
| 19 | 19 |
| 20 class ExtensionManagedModeEventRouter : public PrefObserver { | 20 class ExtensionManagedModeEventRouter : public PrefObserver { |
| 21 public: | 21 public: |
| 22 explicit ExtensionManagedModeEventRouter(Profile* profile); | 22 explicit ExtensionManagedModeEventRouter(Profile* profile); |
| 23 virtual ~ExtensionManagedModeEventRouter(); | 23 virtual ~ExtensionManagedModeEventRouter(); |
| 24 | 24 |
| 25 void Init(); | |
| 26 | |
| 27 // PrefObserver implementation: | 25 // PrefObserver implementation: |
| 28 virtual void OnPreferenceChanged(PrefServiceBase* service, | 26 virtual void OnPreferenceChanged(PrefServiceBase* service, |
| 29 const std::string& pref_name) OVERRIDE; | 27 const std::string& pref_name) OVERRIDE; |
| 30 | 28 |
| 31 private: | 29 private: |
| 32 PrefChangeRegistrar registrar_; | 30 PrefChangeRegistrar registrar_; |
| 33 Profile* profile_; | 31 Profile* profile_; |
| 34 | 32 |
| 35 DISALLOW_COPY_AND_ASSIGN(ExtensionManagedModeEventRouter); | 33 DISALLOW_COPY_AND_ASSIGN(ExtensionManagedModeEventRouter); |
| 36 }; | 34 }; |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 protected: | 78 protected: |
| 81 virtual ~SetPolicyFunction(); | 79 virtual ~SetPolicyFunction(); |
| 82 | 80 |
| 83 // ExtensionFunction: | 81 // ExtensionFunction: |
| 84 virtual bool RunImpl() OVERRIDE; | 82 virtual bool RunImpl() OVERRIDE; |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace extensions | 85 } // namespace extensions |
| 88 | 86 |
| 89 #endif // CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_MANAGED_MODE_API_H_ | 87 #endif // CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_MANAGED_MODE_API_H_ |
| OLD | NEW |