Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 14039004: Add int params to URLDataSource::StartDataRequest(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's not called a renderder. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/about_ui.h ('k') | chrome/browser/ui/webui/app_launcher_page_ui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 profile_(profile) {} 1063 profile_(profile) {}
1064 1064
1065 AboutUIHTMLSource::~AboutUIHTMLSource() {} 1065 AboutUIHTMLSource::~AboutUIHTMLSource() {}
1066 1066
1067 std::string AboutUIHTMLSource::GetSource() const { 1067 std::string AboutUIHTMLSource::GetSource() const {
1068 return source_name_; 1068 return source_name_;
1069 } 1069 }
1070 1070
1071 void AboutUIHTMLSource::StartDataRequest( 1071 void AboutUIHTMLSource::StartDataRequest(
1072 const std::string& path, 1072 const std::string& path,
1073 bool is_incognito, 1073 int render_process_id,
1074 int render_view_id,
1074 const content::URLDataSource::GotDataCallback& callback) { 1075 const content::URLDataSource::GotDataCallback& callback) {
1075 std::string response; 1076 std::string response;
1076 // Add your data source here, in alphabetical order. 1077 // Add your data source here, in alphabetical order.
1077 if (source_name_ == chrome::kChromeUIChromeURLsHost) { 1078 if (source_name_ == chrome::kChromeUIChromeURLsHost) {
1078 response = ChromeURLs(); 1079 response = ChromeURLs();
1079 } else if (source_name_ == chrome::kChromeUICreditsHost) { 1080 } else if (source_name_ == chrome::kChromeUICreditsHost) {
1080 int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML; 1081 int idr = (path == kCreditsJsPath) ? IDR_CREDITS_JS : IDR_CREDITS_HTML;
1081 response = ResourceBundle::GetSharedInstance().GetRawDataResource( 1082 response = ResourceBundle::GetSharedInstance().GetRawDataResource(
1082 idr).as_string(); 1083 idr).as_string();
1083 #if defined(OS_CHROMEOS) 1084 #if defined(OS_CHROMEOS)
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 Profile* profile = Profile::FromWebUI(web_ui); 1166 Profile* profile = Profile::FromWebUI(web_ui);
1166 1167
1167 #if defined(ENABLE_THEMES) 1168 #if defined(ENABLE_THEMES)
1168 // Set up the chrome://theme/ source. 1169 // Set up the chrome://theme/ source.
1169 ThemeSource* theme = new ThemeSource(profile); 1170 ThemeSource* theme = new ThemeSource(profile);
1170 content::URLDataSource::Add(profile, theme); 1171 content::URLDataSource::Add(profile, theme);
1171 #endif 1172 #endif
1172 1173
1173 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1174 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1174 } 1175 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/about_ui.h ('k') | chrome/browser/ui/webui/app_launcher_page_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698