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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
965 profile_(profile) {} | 965 profile_(profile) {} |
966 | 966 |
967 AboutUIHTMLSource::~AboutUIHTMLSource() {} | 967 AboutUIHTMLSource::~AboutUIHTMLSource() {} |
968 | 968 |
969 std::string AboutUIHTMLSource::GetSource() const { | 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 int render_process_id, |
| 976 int render_view_id, |
976 const content::URLDataSource::GotDataCallback& callback) { | 977 const content::URLDataSource::GotDataCallback& callback) { |
977 std::string response; | 978 std::string response; |
978 // Add your data source here, in alphabetical order. | 979 // Add your data source here, in alphabetical order. |
979 if (source_name_ == chrome::kChromeUIChromeURLsHost) { | 980 if (source_name_ == chrome::kChromeUIChromeURLsHost) { |
980 response = ChromeURLs(); | 981 response = ChromeURLs(); |
981 } else if (source_name_ == chrome::kChromeUICreditsHost) { | 982 } else if (source_name_ == chrome::kChromeUICreditsHost) { |
982 int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML; | 983 int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML; |
983 response = ResourceBundle::GetSharedInstance().GetRawDataResource( | 984 response = ResourceBundle::GetSharedInstance().GetRawDataResource( |
984 idr).as_string(); | 985 idr).as_string(); |
985 #if defined(OS_CHROMEOS) | 986 #if defined(OS_CHROMEOS) |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 Profile* profile = Profile::FromWebUI(web_ui); | 1068 Profile* profile = Profile::FromWebUI(web_ui); |
1068 | 1069 |
1069 #if defined(ENABLE_THEMES) | 1070 #if defined(ENABLE_THEMES) |
1070 // Set up the chrome://theme/ source. | 1071 // Set up the chrome://theme/ source. |
1071 ThemeSource* theme = new ThemeSource(profile); | 1072 ThemeSource* theme = new ThemeSource(profile); |
1072 content::URLDataSource::Add(profile, theme); | 1073 content::URLDataSource::Add(profile, theme); |
1073 #endif | 1074 #endif |
1074 | 1075 |
1075 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); | 1076 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); |
1076 } | 1077 } |
OLD | NEW |