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

Side by Side Diff: chrome/common/chrome_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 | « chrome/common/chrome_content_client.h ('k') | chromecast/common/cast_content_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 (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 "chrome/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_client.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 return l10n_util::GetStringUTF16(message_id); 617 return l10n_util::GetStringUTF16(message_id);
618 } 618 }
619 619
620 base::StringPiece ChromeContentClient::GetDataResource( 620 base::StringPiece ChromeContentClient::GetDataResource(
621 int resource_id, 621 int resource_id,
622 ui::ScaleFactor scale_factor) const { 622 ui::ScaleFactor scale_factor) const {
623 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 623 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
624 resource_id, scale_factor); 624 resource_id, scale_factor);
625 } 625 }
626 626
627 base::RefCountedStaticMemory* ChromeContentClient::GetDataResourceBytes( 627 base::RefCountedMemory* ChromeContentClient::GetDataResourceBytes(
628 int resource_id) const { 628 int resource_id) const {
629 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); 629 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
630 } 630 }
631 631
632 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const { 632 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const {
633 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 633 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
634 } 634 }
635 635
636 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) { 636 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) {
637 #if !defined(DISABLE_NACL) 637 #if !defined(DISABLE_NACL)
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 700
701 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() { 701 base::StringPiece ChromeContentClient::GetOriginTrialPublicKey() {
702 return origin_trial_key_manager_.GetPublicKey(); 702 return origin_trial_key_manager_.GetPublicKey();
703 } 703 }
704 704
705 #if defined(OS_ANDROID) 705 #if defined(OS_ANDROID)
706 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 706 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
707 return new ChromeMediaClientAndroid(); 707 return new ChromeMediaClientAndroid();
708 } 708 }
709 #endif // OS_ANDROID 709 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « chrome/common/chrome_content_client.h ('k') | chromecast/common/cast_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698