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

Side by Side Diff: content/browser/webui/web_ui_data_source.cc

Issue 12049052: Move core url data manager classes to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
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/chrome_web_ui_data_source.h" 5 #include "content/browser/webui/web_ui_data_source.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
11 #include "base/string_util.h" 11 #include "base/string_util.h"
12 #include "content/public/common/content_client.h" 12 #include "content/public/common/content_client.h"
13 #include "ui/base/l10n/l10n_util.h" 13 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/webui/jstemplate_builder.h" 14 #include "ui/webui/jstemplate_builder.h"
15 #include "ui/webui/web_ui_util.h" 15 #include "ui/webui/web_ui_util.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 webui::AppendJsonJS(&localized_strings_, &template_data); 198 webui::AppendJsonJS(&localized_strings_, &template_data);
199 callback.Run(base::RefCountedString::TakeString(&template_data)); 199 callback.Run(base::RefCountedString::TakeString(&template_data));
200 } 200 }
201 201
202 void ChromeWebUIDataSource::SendFromResourceBundle( 202 void ChromeWebUIDataSource::SendFromResourceBundle(
203 const content::URLDataSource::GotDataCallback& callback, int idr) { 203 const content::URLDataSource::GotDataCallback& callback, int idr) {
204 scoped_refptr<base::RefCountedStaticMemory> response( 204 scoped_refptr<base::RefCountedStaticMemory> response(
205 content::GetContentClient()->GetDataResourceBytes(idr)); 205 content::GetContentClient()->GetDataResourceBytes(idr));
206 callback.Run(response); 206 callback.Run(response);
207 } 207 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698