| 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() { | 969 std::string AboutUIHTMLSource::GetSource() { |
| 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 const content::URLDataSource::ExtraRequestInfo& info, |
| 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) { |
| 980 response = ChromeURLs(); | 980 response = ChromeURLs(); |
| 981 } else if (source_name_ == chrome::kChromeUICreditsHost) { | 981 } else if (source_name_ == chrome::kChromeUICreditsHost) { |
| 982 int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML; | 982 int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML; |
| 983 response = ResourceBundle::GetSharedInstance().GetRawDataResource( | 983 response = ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 984 idr).as_string(); | 984 idr).as_string(); |
| 985 #if defined(OS_CHROMEOS) | 985 #if defined(OS_CHROMEOS) |
| (...skipping 81 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 |