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

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

Issue 703273002: Update mojo sdk to rev 04a510fb37db10642e156957f9b2c11c2f6442ac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix content/child -> mojo/common linking Created 6 years, 1 month 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
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/webui/web_ui_mojo_browsertest.cc » ('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 "content/browser/webui/web_ui_data_source_impl.h" 5 #include "content/browser/webui/web_ui_data_source_impl.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/strings/string_util.h" 11 #include "base/strings/string_util.h"
12 #include "content/grit/content_resources.h" 12 #include "content/grit/content_resources.h"
13 #include "content/public/common/content_client.h" 13 #include "content/public/common/content_client.h"
14 #include "mojo/public/js/bindings/constants.h" 14 #include "mojo/public/js/constants.h"
15 #include "ui/base/webui/jstemplate_builder.h" 15 #include "ui/base/webui/jstemplate_builder.h"
16 #include "ui/base/webui/web_ui_util.h" 16 #include "ui/base/webui/web_ui_util.h"
17 17
18 namespace content { 18 namespace content {
19 19
20 // static 20 // static
21 WebUIDataSource* WebUIDataSource::Create(const std::string& source_name) { 21 WebUIDataSource* WebUIDataSource::Create(const std::string& source_name) {
22 return new WebUIDataSourceImpl(source_name); 22 return new WebUIDataSourceImpl(source_name);
23 } 23 }
24 24
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 238 }
239 239
240 void WebUIDataSourceImpl::SendFromResourceBundle( 240 void WebUIDataSourceImpl::SendFromResourceBundle(
241 const URLDataSource::GotDataCallback& callback, int idr) { 241 const URLDataSource::GotDataCallback& callback, int idr) {
242 scoped_refptr<base::RefCountedStaticMemory> response( 242 scoped_refptr<base::RefCountedStaticMemory> response(
243 GetContentClient()->GetDataResourceBytes(idr)); 243 GetContentClient()->GetDataResourceBytes(idr));
244 callback.Run(response.get()); 244 callback.Run(response.get());
245 } 245 }
246 246
247 } // namespace content 247 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/webui/web_ui_mojo_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698