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

Side by Side Diff: chrome/browser/ui/webui/options/options_managed_banner_handler.h

Issue 7096013: Allow device policy code to be optionally included. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make changes requested by torne. Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
11 #include "chrome/browser/policy/managed_prefs_banner_base.h" 11 #include "chrome/browser/policy/managed_prefs_banner_base.h"
12 #include "chrome/browser/ui/options/options_util.h" 12 #include "chrome/browser/ui/options/options_util.h"
13 13
14 class WebUI; 14 class WebUI;
15 15
16 // Managed options banner handler. 16 // Managed options banner handler.
17 // Controls the display of a banner if an options panel contains options 17 // Controls the display of a banner if an options panel contains options
18 // that are under administator control. 18 // that are under administator control.
19 class OptionsManagedBannerHandler : public policy::ManagedPrefsBannerBase { 19 class OptionsManagedBannerHandler : public policy::ManagedPrefsBannerBase {
20 public: 20 public:
21 OptionsManagedBannerHandler(WebUI* web_ui, 21 static OptionsManagedBannerHandler* Create(WebUI* web_ui,
22 const string16& page_name, 22 const string16& page_name,
23 OptionsPage page); 23 OptionsPage page);
24 virtual ~OptionsManagedBannerHandler(); 24 virtual ~OptionsManagedBannerHandler();
25 25
26 protected: 26 protected:
27 // ManagedPrefsBannerBase implementation. 27 // ManagedPrefsBannerBase implementation.
28 virtual void OnUpdateVisibility(); 28 virtual void OnUpdateVisibility();
29 29
30 private: 30 private:
31 OptionsManagedBannerHandler(WebUI* web_ui,
32 const string16& page_name,
33 OptionsPage page);
34
31 // Set the managed options banner to be visible or invisible. 35 // Set the managed options banner to be visible or invisible.
32 void SetupBannerVisibility(); 36 void SetupBannerVisibility();
33 37
34 WebUI* web_ui_; // weak reference to the WebUI. 38 WebUI* web_ui_; // weak reference to the WebUI.
35 string16 page_name_; // current options page name. 39 string16 page_name_; // current options page name.
36 OptionsPage page_; // current options page value. 40 OptionsPage page_; // current options page value.
37 41
38 DISALLOW_COPY_AND_ASSIGN(OptionsManagedBannerHandler); 42 DISALLOW_COPY_AND_ASSIGN(OptionsManagedBannerHandler);
39 }; 43 };
40 44
41 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_ 45 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_OPTIONS_MANAGED_BANNER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698