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

Side by Side Diff: chromecast/common/cast_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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/common/cast_content_client.h" 5 #include "chromecast/common/cast_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/sys_info.h" 10 #include "base/sys_info.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return l10n_util::GetStringUTF16(message_id); 94 return l10n_util::GetStringUTF16(message_id);
95 } 95 }
96 96
97 base::StringPiece CastContentClient::GetDataResource( 97 base::StringPiece CastContentClient::GetDataResource(
98 int resource_id, 98 int resource_id,
99 ui::ScaleFactor scale_factor) const { 99 ui::ScaleFactor scale_factor) const {
100 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 100 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
101 resource_id, scale_factor); 101 resource_id, scale_factor);
102 } 102 }
103 103
104 base::RefCountedStaticMemory* CastContentClient::GetDataResourceBytes( 104 base::RefCountedMemory* CastContentClient::GetDataResourceBytes(
105 int resource_id) const { 105 int resource_id) const {
106 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( 106 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
107 resource_id); 107 resource_id);
108 } 108 }
109 109
110 gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) const { 110 gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) const {
111 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 111 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
112 resource_id); 112 resource_id);
113 } 113 }
114 114
115 } // namespace shell 115 } // namespace shell
116 } // namespace chromecast 116 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/common/cast_content_client.h ('k') | content/browser/webui/web_ui_data_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698