OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/ui/webui/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
959 | 959 |
960 // AboutUIHTMLSource ---------------------------------------------------------- | 960 // AboutUIHTMLSource ---------------------------------------------------------- |
961 | 961 |
962 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, | 962 AboutUIHTMLSource::AboutUIHTMLSource(const std::string& source_name, |
963 Profile* profile) | 963 Profile* profile) |
964 : source_name_(source_name), | 964 : source_name_(source_name), |
965 profile_(profile) {} | 965 profile_(profile) {} |
966 | 966 |
967 AboutUIHTMLSource::~AboutUIHTMLSource() {} | 967 AboutUIHTMLSource::~AboutUIHTMLSource() {} |
968 | 968 |
969 std::string AboutUIHTMLSource::GetSource() { | 969 std::string AboutUIHTMLSource::GetSource() const { |
970 return source_name_; | 970 return source_name_; |
971 } | 971 } |
972 | 972 |
973 void AboutUIHTMLSource::StartDataRequest( | 973 void AboutUIHTMLSource::StartDataRequest( |
974 const std::string& path, | 974 const std::string& path, |
975 bool is_incognito, | 975 bool is_incognito, |
976 const content::URLDataSource::GotDataCallback& callback) { | 976 const content::URLDataSource::GotDataCallback& callback) { |
977 std::string response; | 977 std::string response; |
978 // Add your data source here, in alphabetical order. | 978 // Add your data source here, in alphabetical order. |
979 if (source_name_ == chrome::kChromeUIChromeURLsHost) { | 979 if (source_name_ == chrome::kChromeUIChromeURLsHost) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 Profile* profile = Profile::FromWebUI(web_ui); | 1067 Profile* profile = Profile::FromWebUI(web_ui); |
1068 | 1068 |
1069 #if defined(ENABLE_THEMES) | 1069 #if defined(ENABLE_THEMES) |
1070 // Set up the chrome://theme/ source. | 1070 // Set up the chrome://theme/ source. |
1071 ThemeSource* theme = new ThemeSource(profile); | 1071 ThemeSource* theme = new ThemeSource(profile); |
1072 content::URLDataSource::Add(profile, theme); | 1072 content::URLDataSource::Add(profile, theme); |
1073 #endif | 1073 #endif |
1074 | 1074 |
1075 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); | 1075 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); |
1076 } | 1076 } |
OLD | NEW |