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

Side by Side Diff: content/shell/common/shell_content_client.cc

Issue 1030743002: Path 1 of 4: Move blink image resources to blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « content/child/blink_platform_impl.cc ('k') | tools/gritsettings/resource_ids » ('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 "content/shell/common/shell_content_client.h" 5 #include "content/shell/common/shell_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "content/app/resources/grit/content_resources.h" 10 #include "content/app/resources/grit/content_resources.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 return l10n_util::GetStringUTF16(message_id); 58 return l10n_util::GetStringUTF16(message_id);
59 } 59 }
60 60
61 base::StringPiece ShellContentClient::GetDataResource( 61 base::StringPiece ShellContentClient::GetDataResource(
62 int resource_id, 62 int resource_id,
63 ui::ScaleFactor scale_factor) const { 63 ui::ScaleFactor scale_factor) const {
64 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 64 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
65 switches::kRunLayoutTest)) { 65 switches::kRunLayoutTest)) {
66 switch (resource_id) { 66 switch (resource_id) {
67 case IDR_BROKENIMAGE: 67 case IDR2_BROKENIMAGE:
68 #if defined(OS_MACOSX) 68 #if defined(OS_MACOSX)
69 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG; 69 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG;
70 #else 70 #else
71 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_GIF; 71 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_GIF;
72 #endif 72 #endif
73 break; 73 break;
74 74
75 case IDR_TEXTAREA_RESIZER: 75 case IDR2_TEXTAREA_RESIZER:
76 resource_id = IDR_CONTENT_SHELL_TEXT_AREA_RESIZE_CORNER_PNG; 76 resource_id = IDR_CONTENT_SHELL_TEXT_AREA_RESIZE_CORNER_PNG;
77 break; 77 break;
78 } 78 }
79 } 79 }
80 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 80 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
81 resource_id, scale_factor); 81 resource_id, scale_factor);
82 } 82 }
83 83
84 base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes( 84 base::RefCountedStaticMemory* ShellContentClient::GetDataResourceBytes(
85 int resource_id) const { 85 int resource_id) const {
86 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); 86 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
87 } 87 }
88 88
89 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { 89 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
90 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 90 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
91 } 91 }
92 92
93 } // namespace content 93 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | tools/gritsettings/resource_ids » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698