OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/scoped_ptr.h" |
| 10 #include "base/values.h" |
| 11 #include "chrome/browser/policy/configuration_policy_reader.h" |
| 12 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
| 13 #include "content/common/notification_observer.h" |
| 14 |
| 15 // The base class handler of Javascript messages of the about:policy page. |
| 16 class PolicyUIHandler : public WebUIMessageHandler { |
| 17 public: |
| 18 PolicyUIHandler(); |
| 19 virtual ~PolicyUIHandler(); |
| 20 |
| 21 // WebUIMessageHandler implementation. |
| 22 virtual WebUIMessageHandler* Attach(WebUI* web_ui) OVERRIDE; |
| 23 virtual void RegisterMessages() OVERRIDE; |
| 24 |
| 25 private: |
| 26 typedef policy::ConfigurationPolicyReader ConfigurationPolicyReader; |
| 27 |
| 28 // Callback for the "requestPolicyData" message. |
| 29 void HandleRequestPolicyData(const ListValue* args); |
| 30 |
| 31 scoped_ptr<policy::PolicyStatus> policy_status_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); |
| 34 }; |
| 35 |
| 36 // The Web UI handler for about:policy. |
| 37 class PolicyUI : public ChromeWebUI { |
| 38 public: |
| 39 explicit PolicyUI(TabContents* contents); |
| 40 virtual ~PolicyUI(); |
| 41 |
| 42 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(PolicyUI); |
| 44 }; |
| 45 |
| 46 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ |
OLD | NEW |