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

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

Issue 10383006: Add scale factor and 2x resources from webkit and plumb through to ContentClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add more test class GetImageResource methods. Created 8 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_content_client.h ('k') | content/test/test_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 "content/shell/shell_content_client.h" 5 #include "content/shell/shell_content_client.h"
6 6
7 #include "base/string_piece.h" 7 #include "base/string_piece.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "webkit/glue/user_agent.h" 9 #include "webkit/glue/user_agent.h"
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 string16 ShellContentClient::GetLocalizedString(int message_id) const { 51 string16 ShellContentClient::GetLocalizedString(int message_id) const {
52 return string16(); 52 return string16();
53 } 53 }
54 54
55 base::StringPiece ShellContentClient::GetDataResource(int resource_id) const { 55 base::StringPiece ShellContentClient::GetDataResource(int resource_id) const {
56 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); 56 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
57 } 57 }
58 58
59 base::StringPiece ShellContentClient::GetImageResource(
60 int resource_id,
61 float scale_factor) const {
62 // TODO(flackr): Pass scale_factor to ResourceBundle to get best matching
63 // image resource for the given scale factor.
64 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id);
65 }
66
59 #if defined(OS_WIN) 67 #if defined(OS_WIN)
60 bool ShellContentClient::SandboxPlugin(CommandLine* command_line, 68 bool ShellContentClient::SandboxPlugin(CommandLine* command_line,
61 sandbox::TargetPolicy* policy) { 69 sandbox::TargetPolicy* policy) {
62 return false; 70 return false;
63 } 71 }
64 #endif 72 #endif
65 73
66 #if defined(OS_MACOSX) 74 #if defined(OS_MACOSX)
67 bool ShellContentClient::GetSandboxProfileForSandboxType( 75 bool ShellContentClient::GetSandboxProfileForSandboxType(
68 int sandbox_type, 76 int sandbox_type,
69 int* sandbox_profile_resource_id) const { 77 int* sandbox_profile_resource_id) const {
70 return false; 78 return false;
71 } 79 }
72 #endif 80 #endif
73 81
74 } // namespace content 82 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_content_client.h ('k') | content/test/test_content_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698