OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_MANAGED_PREFS_BANNER_BASE_H_ | 5 #ifndef CHROME_BROWSER_POLICY_MANAGED_PREFS_BANNER_BASE_H_ |
6 #define CHROME_BROWSER_MANAGED_PREFS_BANNER_BASE_H_ | 6 #define CHROME_BROWSER_POLICY_MANAGED_PREFS_BANNER_BASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
11 #include "chrome/browser/options_window.h" | 11 #include "chrome/browser/options_window.h" |
12 #include "chrome/browser/pref_set_observer.h" | 12 #include "chrome/browser/prefs/pref_set_observer.h" |
13 #include "chrome/common/notification_observer.h" | 13 #include "chrome/common/notification_observer.h" |
14 | 14 |
15 class PrefService; | 15 class PrefService; |
16 | 16 |
17 // Common base functionality for the managed prefs warning banner displayed in | 17 // Common base functionality for the managed prefs warning banner displayed in |
18 // the preference dialogs when there are options that are controlled by | 18 // the preference dialogs when there are options that are controlled by |
19 // configuration policy and thus cannot be changed by the user. | 19 // configuration policy and thus cannot be changed by the user. |
20 class ManagedPrefsBannerBase : public NotificationObserver { | 20 class ManagedPrefsBannerBase : public NotificationObserver { |
21 public: | 21 public: |
22 // Initialize the banner with a set of preferences suitable for the given | 22 // Initialize the banner with a set of preferences suitable for the given |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // |NotificationObserver| implementation. | 58 // |NotificationObserver| implementation. |
59 virtual void Observe(NotificationType type, | 59 virtual void Observe(NotificationType type, |
60 const NotificationSource& source, | 60 const NotificationSource& source, |
61 const NotificationDetails& details); | 61 const NotificationDetails& details); |
62 | 62 |
63 scoped_ptr<PrefSetObserver> local_state_set_; | 63 scoped_ptr<PrefSetObserver> local_state_set_; |
64 scoped_ptr<PrefSetObserver> user_pref_set_; | 64 scoped_ptr<PrefSetObserver> user_pref_set_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(ManagedPrefsBannerBase); | 66 DISALLOW_COPY_AND_ASSIGN(ManagedPrefsBannerBase); |
67 }; | 67 }; |
68 #endif // CHROME_BROWSER_MANAGED_PREFS_BANNER_BASE_H_ | 68 #endif // CHROME_BROWSER_POLICY_MANAGED_PREFS_BANNER_BASE_H_ |
OLD | NEW |