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

Side by Side Diff: blimp/engine/common/blimp_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 | « blimp/engine/common/blimp_content_client.h ('k') | chrome/browser/search/iframe_source.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "blimp/engine/common/blimp_content_client.h" 5 #include "blimp/engine/common/blimp_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 blimp { 10 namespace blimp {
11 namespace engine { 11 namespace engine {
12 12
13 BlimpContentClient::~BlimpContentClient() {} 13 BlimpContentClient::~BlimpContentClient() {}
14 14
15 std::string BlimpContentClient::GetUserAgent() const { 15 std::string BlimpContentClient::GetUserAgent() const {
16 return GetBlimpEngineUserAgent(); 16 return GetBlimpEngineUserAgent();
17 } 17 }
18 18
19 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const { 19 base::string16 BlimpContentClient::GetLocalizedString(int message_id) const {
20 return l10n_util::GetStringUTF16(message_id); 20 return l10n_util::GetStringUTF16(message_id);
21 } 21 }
22 22
23 base::StringPiece BlimpContentClient::GetDataResource( 23 base::StringPiece BlimpContentClient::GetDataResource(
24 int resource_id, 24 int resource_id,
25 ui::ScaleFactor scale_factor) const { 25 ui::ScaleFactor scale_factor) const {
26 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 26 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
27 resource_id, scale_factor); 27 resource_id, scale_factor);
28 } 28 }
29 29
30 base::RefCountedStaticMemory* BlimpContentClient::GetDataResourceBytes( 30 base::RefCountedMemory* BlimpContentClient::GetDataResourceBytes(
31 int resource_id) const { 31 int resource_id) const {
32 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( 32 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
33 resource_id); 33 resource_id);
34 } 34 }
35 35
36 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const { 36 gfx::Image& BlimpContentClient::GetNativeImageNamed(int resource_id) const {
37 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 37 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
38 resource_id); 38 resource_id);
39 } 39 }
40 40
41 } // namespace engine 41 } // namespace engine
42 } // namespace blimp 42 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/engine/common/blimp_content_client.h ('k') | chrome/browser/search/iframe_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698