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

Side by Side Diff: extensions/shell/common/shell_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, 6 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 | « extensions/shell/common/shell_content_client.h ('k') | headless/lib/headless_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 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 "extensions/shell/common/shell_content_client.h" 5 #include "extensions/shell/common/shell_content_client.h"
6 6
7 #include "base/strings/string_piece.h" 7 #include "base/strings/string_piece.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "content/public/common/user_agent.h" 9 #include "content/public/common/user_agent.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 return l10n_util::GetStringUTF16(message_id); 102 return l10n_util::GetStringUTF16(message_id);
103 } 103 }
104 104
105 base::StringPiece ShellContentClient::GetDataResource( 105 base::StringPiece ShellContentClient::GetDataResource(
106 int resource_id, 106 int resource_id,
107 ui::ScaleFactor scale_factor) const { 107 ui::ScaleFactor scale_factor) const {
108 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 108 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
109 resource_id, scale_factor); 109 resource_id, scale_factor);
110 } 110 }
111 111
112 base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes( 112 base::RefCountedMemory* ShellContentClient::GetDataResourceBytes(
113 int resource_id) const { 113 int resource_id) const {
114 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); 114 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
115 } 115 }
116 116
117 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { 117 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
118 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 118 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
119 } 119 }
120 120
121 } // namespace extensions 121 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/common/shell_content_client.h ('k') | headless/lib/headless_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698