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_ABOUT_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
| 13 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
| 14 |
| 15 class Profile; |
| 16 class TabContents; |
| 17 |
| 18 // We expose this class because the OOBE flow may need to explicitly add the |
| 19 // chrome://terms source outside of the normal flow. |
| 20 class AboutUIHTMLSource : public ChromeURLDataManager::DataSource { |
| 21 public: |
| 22 // Construct a data source for the specified |source_name|. |
| 23 AboutUIHTMLSource(const std::string& source_name, Profile* profile); |
| 24 |
| 25 // Called when the network layer has requested a resource underneath |
| 26 // the path we registered. |
| 27 virtual void StartDataRequest(const std::string& path, |
| 28 bool is_incognito, |
| 29 int request_id) OVERRIDE; |
| 30 |
| 31 virtual std::string GetMimeType(const std::string& path) const OVERRIDE; |
| 32 |
| 33 // Send the response data. |
| 34 void FinishDataRequest(const std::string& html, int request_id); |
| 35 |
| 36 Profile* profile() { return profile_; } |
| 37 |
| 38 private: |
| 39 virtual ~AboutUIHTMLSource(); |
| 40 |
| 41 Profile* profile_; |
| 42 |
| 43 DISALLOW_COPY_AND_ASSIGN(AboutUIHTMLSource); |
| 44 }; |
| 45 |
| 46 class AboutUI : public ChromeWebUI { |
| 47 public: |
| 48 explicit AboutUI(TabContents* contents, const std::string& host); |
| 49 virtual ~AboutUI() {} |
| 50 |
| 51 private: |
| 52 DISALLOW_COPY_AND_ASSIGN(AboutUI); |
| 53 }; |
| 54 |
| 55 #endif // CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ |
OLD | NEW |