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

Side by Side Diff: headless/lib/headless_content_client.cc

Issue 1996723002: Switch ResourceBundle LoadDataResourceBytes to return RefCountedMemory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update to address newly added use Created 4 years, 7 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
« no previous file with comments | « headless/lib/headless_content_client.h ('k') | ios/web/public/test/test_web_client.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "headless/lib/headless_content_client.h" 5 #include "headless/lib/headless_content_client.h"
6 6
7 #include "ui/base/l10n/l10n_util.h" 7 #include "ui/base/l10n/l10n_util.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 9
10 namespace headless { 10 namespace headless {
(...skipping 12 matching lines...) Expand all
23 return l10n_util::GetStringUTF16(message_id); 23 return l10n_util::GetStringUTF16(message_id);
24 } 24 }
25 25
26 base::StringPiece HeadlessContentClient::GetDataResource( 26 base::StringPiece HeadlessContentClient::GetDataResource(
27 int resource_id, 27 int resource_id,
28 ui::ScaleFactor scale_factor) const { 28 ui::ScaleFactor scale_factor) const {
29 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 29 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
30 resource_id, scale_factor); 30 resource_id, scale_factor);
31 } 31 }
32 32
33 base::RefCountedStaticMemory* HeadlessContentClient::GetDataResourceBytes( 33 base::RefCountedMemory* HeadlessContentClient::GetDataResourceBytes(
34 int resource_id) const { 34 int resource_id) const {
35 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); 35 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
36 } 36 }
37 37
38 gfx::Image& HeadlessContentClient::GetNativeImageNamed(int resource_id) const { 38 gfx::Image& HeadlessContentClient::GetNativeImageNamed(int resource_id) const {
39 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 39 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
40 } 40 }
41 41
42 } // namespace headless 42 } // namespace headless
OLDNEW
« no previous file with comments | « headless/lib/headless_content_client.h ('k') | ios/web/public/test/test_web_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698