OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "chrome/browser/gtk/options/managed_prefs_banner_gtk.h" | 5 #include "chrome/browser/ui/gtk/options/managed_prefs_banner_gtk.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "chrome/browser/gtk/gtk_theme_provider.h" | 8 #include "chrome/browser/ui/gtk/gtk_theme_provider.h" |
9 #include "chrome/browser/gtk/gtk_util.h" | 9 #include "chrome/browser/ui/gtk/gtk_util.h" |
10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 // Padding within the banner box. | 14 // Padding within the banner box. |
15 const int kBannerPadding = 3; | 15 const int kBannerPadding = 3; |
16 | 16 |
17 } | 17 } |
18 | 18 |
19 ManagedPrefsBannerGtk::ManagedPrefsBannerGtk(PrefService* prefs, | 19 ManagedPrefsBannerGtk::ManagedPrefsBannerGtk(PrefService* prefs, |
(...skipping 20 matching lines...) Expand all Loading... |
40 gtk_widget_set_no_show_all(GTK_WIDGET(banner_widget_), TRUE); | 40 gtk_widget_set_no_show_all(GTK_WIDGET(banner_widget_), TRUE); |
41 } | 41 } |
42 | 42 |
43 void ManagedPrefsBannerGtk::OnUpdateVisibility() { | 43 void ManagedPrefsBannerGtk::OnUpdateVisibility() { |
44 DCHECK(banner_widget_); | 44 DCHECK(banner_widget_); |
45 if (DetermineVisibility()) | 45 if (DetermineVisibility()) |
46 gtk_widget_show(banner_widget_); | 46 gtk_widget_show(banner_widget_); |
47 else | 47 else |
48 gtk_widget_hide(banner_widget_); | 48 gtk_widget_hide(banner_widget_); |
49 } | 49 } |
OLD | NEW |