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_ABOUT_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 12 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
13 #include "content/browser/webui/web_ui.h" | 13 #include "content/browser/webui/web_ui.h" |
| 14 #include "content/public/browser/web_ui_controller.h" |
14 | 15 |
15 class Profile; | 16 class Profile; |
16 class TabContents; | 17 class TabContents; |
17 | 18 |
18 // We expose this class because the OOBE flow may need to explicitly add the | 19 // We expose this class because the OOBE flow may need to explicitly add the |
19 // chrome://terms source outside of the normal flow. | 20 // chrome://terms source outside of the normal flow. |
20 class AboutUIHTMLSource : public ChromeURLDataManager::DataSource { | 21 class AboutUIHTMLSource : public ChromeURLDataManager::DataSource { |
21 public: | 22 public: |
22 // Construct a data source for the specified |source_name|. | 23 // Construct a data source for the specified |source_name|. |
23 AboutUIHTMLSource(const std::string& source_name, Profile* profile); | 24 AboutUIHTMLSource(const std::string& source_name, Profile* profile); |
(...skipping 12 matching lines...) Expand all Loading... |
36 Profile* profile() { return profile_; } | 37 Profile* profile() { return profile_; } |
37 | 38 |
38 private: | 39 private: |
39 virtual ~AboutUIHTMLSource(); | 40 virtual ~AboutUIHTMLSource(); |
40 | 41 |
41 Profile* profile_; | 42 Profile* profile_; |
42 | 43 |
43 DISALLOW_COPY_AND_ASSIGN(AboutUIHTMLSource); | 44 DISALLOW_COPY_AND_ASSIGN(AboutUIHTMLSource); |
44 }; | 45 }; |
45 | 46 |
46 class AboutUI : public WebUI { | 47 class AboutUI : public WebUI, public content::WebUIController { |
47 public: | 48 public: |
48 explicit AboutUI(content::WebContents* contents, const std::string& host); | 49 explicit AboutUI(content::WebContents* contents, const std::string& host); |
49 virtual ~AboutUI() {} | 50 virtual ~AboutUI() {} |
50 | 51 |
51 private: | 52 private: |
52 DISALLOW_COPY_AND_ASSIGN(AboutUI); | 53 DISALLOW_COPY_AND_ASSIGN(AboutUI); |
53 }; | 54 }; |
54 | 55 |
55 #endif // CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ | 56 #endif // CHROME_BROWSER_UI_WEBUI_ABOUT_UI_H_ |
OLD | NEW |