| OLD | NEW |
| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // The "19" is so that sites that sniff for version think that this is | 45 // The "19" is so that sites that sniff for version think that this is |
| 46 // something reasonably current; the "77.34.5" is a hint that this isn't a | 46 // something reasonably current; the "77.34.5" is a hint that this isn't a |
| 47 // standard Chrome. | 47 // standard Chrome. |
| 48 return webkit_glue::BuildUserAgentFromProduct("Chrome/19.77.34.5"); | 48 return webkit_glue::BuildUserAgentFromProduct("Chrome/19.77.34.5"); |
| 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( |
| 56 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); | |
| 57 } | |
| 58 | |
| 59 base::StringPiece ShellContentClient::GetImageResource( | |
| 60 int resource_id, | 56 int resource_id, |
| 61 float scale_factor) const { | 57 ui::ScaleFactor scale_factor) const { |
| 62 // TODO(flackr): Pass scale_factor to ResourceBundle to get best matching | 58 return ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 63 // image resource for the given scale factor. | 59 resource_id, scale_factor); |
| 64 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); | |
| 65 } | 60 } |
| 66 | 61 |
| 67 #if defined(OS_WIN) | 62 #if defined(OS_WIN) |
| 68 bool ShellContentClient::SandboxPlugin(CommandLine* command_line, | 63 bool ShellContentClient::SandboxPlugin(CommandLine* command_line, |
| 69 sandbox::TargetPolicy* policy) { | 64 sandbox::TargetPolicy* policy) { |
| 70 return false; | 65 return false; |
| 71 } | 66 } |
| 72 #endif | 67 #endif |
| 73 | 68 |
| 74 #if defined(OS_MACOSX) | 69 #if defined(OS_MACOSX) |
| 75 bool ShellContentClient::GetSandboxProfileForSandboxType( | 70 bool ShellContentClient::GetSandboxProfileForSandboxType( |
| 76 int sandbox_type, | 71 int sandbox_type, |
| 77 int* sandbox_profile_resource_id) const { | 72 int* sandbox_profile_resource_id) const { |
| 78 return false; | 73 return false; |
| 79 } | 74 } |
| 80 #endif | 75 #endif |
| 81 | 76 |
| 82 } // namespace content | 77 } // namespace content |
| OLD | NEW |