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

Side by Side Diff: chromecast/common/cast_content_client.cc

Issue 2311223003: [chromecast] Add ResourceBundle::LoadLocalizedResourceBytes(). (Closed)
Patch Set: [chromecast] Add ResourceBundle::LoadLocalizedResourceBytes() to to get binary data from locale_res… Created 4 years, 3 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 | « no previous file | content/browser/webui/web_ui_data_source_impl.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 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 base::StringPiece CastContentClient::GetDataResource( 101 base::StringPiece CastContentClient::GetDataResource(
102 int resource_id, 102 int resource_id,
103 ui::ScaleFactor scale_factor) const { 103 ui::ScaleFactor scale_factor) const {
104 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 104 return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
105 resource_id, scale_factor); 105 resource_id, scale_factor);
106 } 106 }
107 107
108 base::RefCountedMemory* CastContentClient::GetDataResourceBytes( 108 base::RefCountedMemory* CastContentClient::GetDataResourceBytes(
109 int resource_id) const { 109 int resource_id) const {
110 return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( 110 return ui::ResourceBundle::GetSharedInstance().LoadLocalizedResourceBytes(
111 resource_id); 111 resource_id);
112 } 112 }
113 113
114 gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) const { 114 gfx::Image& CastContentClient::GetNativeImageNamed(int resource_id) const {
115 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( 115 return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
116 resource_id); 116 resource_id);
117 } 117 }
118 118
119 #if defined(OS_ANDROID) 119 #if defined(OS_ANDROID)
120 ::media::MediaClientAndroid* CastContentClient::GetMediaClientAndroid() { 120 ::media::MediaClientAndroid* CastContentClient::GetMediaClientAndroid() {
121 return new media::CastMediaClientAndroid(); 121 return new media::CastMediaClientAndroid();
122 } 122 }
123 #endif // OS_ANDROID 123 #endif // OS_ANDROID
124 124
125 } // namespace shell 125 } // namespace shell
126 } // namespace chromecast 126 } // namespace chromecast
OLDNEW
« no previous file with comments | « no previous file | content/browser/webui/web_ui_data_source_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698