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_GTK_OPTIONS_MANAGED_PREFS_BANNER_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_OPTIONS_MANAGED_PREFS_BANNER_GTK_H_ |
6 #define CHROME_BROWSER_GTK_OPTIONS_MANAGED_PREFS_BANNER_GTK_H_ | 6 #define CHROME_BROWSER_GTK_OPTIONS_MANAGED_PREFS_BANNER_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <gtk/gtk.h> | 9 #include <gtk/gtk.h> |
10 | 10 |
11 #include "chrome/browser/managed_prefs_banner_base.h" | 11 #include "chrome/browser/policy/managed_prefs_banner_base.h" |
12 | 12 |
13 // Constructs and maintains a GTK widget displaying a warning banner. The banner | 13 // Constructs and maintains a GTK widget displaying a warning banner. The banner |
14 // is displayed on the preferences dialog whenever there are options that are | 14 // is displayed on the preferences dialog whenever there are options that are |
15 // not settable by the user due to policy. | 15 // not settable by the user due to policy. |
16 class ManagedPrefsBannerGtk : public ManagedPrefsBannerBase { | 16 class ManagedPrefsBannerGtk : public ManagedPrefsBannerBase { |
17 public: | 17 public: |
18 ManagedPrefsBannerGtk(PrefService* prefs, OptionsPage page); | 18 ManagedPrefsBannerGtk(PrefService* prefs, OptionsPage page); |
19 virtual ~ManagedPrefsBannerGtk() { } | 19 virtual ~ManagedPrefsBannerGtk() { } |
20 | 20 |
21 GtkWidget* banner_widget() { return banner_widget_; } | 21 GtkWidget* banner_widget() { return banner_widget_; } |
22 | 22 |
23 protected: | 23 protected: |
24 // Update widget visibility. | 24 // Update widget visibility. |
25 virtual void OnUpdateVisibility(); | 25 virtual void OnUpdateVisibility(); |
26 | 26 |
27 private: | 27 private: |
28 // Construct the widget. | 28 // Construct the widget. |
29 void InitWidget(); | 29 void InitWidget(); |
30 | 30 |
31 GtkWidget* banner_widget_; | 31 GtkWidget* banner_widget_; |
32 | 32 |
33 DISALLOW_COPY_AND_ASSIGN(ManagedPrefsBannerGtk); | 33 DISALLOW_COPY_AND_ASSIGN(ManagedPrefsBannerGtk); |
34 }; | 34 }; |
35 | 35 |
36 #endif // CHROME_BROWSER_GTK_OPTIONS_MANAGED_PREFS_BANNER_GTK_H_ | 36 #endif // CHROME_BROWSER_GTK_OPTIONS_MANAGED_PREFS_BANNER_GTK_H_ |
OLD | NEW |