| 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 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/policy/cloud_policy_subsystem.h" | 11 #include "chrome/browser/policy/cloud_policy_subsystem.h" |
| 12 #include "chrome/browser/policy/configuration_policy_reader.h" | 12 #include "chrome/browser/policy/configuration_policy_reader.h" |
| 13 #include "content/browser/webui/web_ui.h" | |
| 14 #include "content/public/browser/web_ui_controller.h" | 13 #include "content/public/browser/web_ui_controller.h" |
| 15 #include "content/public/browser/web_ui_message_handler.h" | 14 #include "content/public/browser/web_ui_message_handler.h" |
| 16 | 15 |
| 17 namespace policy { | 16 namespace policy { |
| 18 class CloudPolicyDataStore; | 17 class CloudPolicyDataStore; |
| 19 } | 18 } |
| 20 | 19 |
| 21 // The base class handler of Javascript messages of the about:policy page. | 20 // The base class handler of Javascript messages of the about:policy page. |
| 22 class PolicyUIHandler : public content::WebUIMessageHandler, | 21 class PolicyUIHandler : public content::WebUIMessageHandler, |
| 23 public policy::PolicyStatus::Observer { | 22 public policy::PolicyStatus::Observer { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // enum value |error_details|. | 63 // enum value |error_details|. |
| 65 static string16 CreateStatusMessageString( | 64 static string16 CreateStatusMessageString( |
| 66 policy::CloudPolicySubsystem::ErrorDetails error_details); | 65 policy::CloudPolicySubsystem::ErrorDetails error_details); |
| 67 | 66 |
| 68 scoped_ptr<policy::PolicyStatus> policy_status_; | 67 scoped_ptr<policy::PolicyStatus> policy_status_; |
| 69 | 68 |
| 70 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); | 69 DISALLOW_COPY_AND_ASSIGN(PolicyUIHandler); |
| 71 }; | 70 }; |
| 72 | 71 |
| 73 // The Web UI handler for about:policy. | 72 // The Web UI handler for about:policy. |
| 74 class PolicyUI : public WebUI, public content::WebUIController { | 73 class PolicyUI : public content::WebUIController { |
| 75 public: | 74 public: |
| 76 explicit PolicyUI(content::WebContents* contents); | 75 explicit PolicyUI(WebUI* web_ui); |
| 77 virtual ~PolicyUI(); | 76 virtual ~PolicyUI(); |
| 78 | 77 |
| 79 private: | 78 private: |
| 80 DISALLOW_COPY_AND_ASSIGN(PolicyUI); | 79 DISALLOW_COPY_AND_ASSIGN(PolicyUI); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ | 82 #endif // CHROME_BROWSER_UI_WEBUI_POLICY_UI_H_ |
| OLD | NEW |