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 "chrome/common/chrome_content_client.h" | 5 #include "chrome/common/chrome_content_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 } | 413 } |
414 | 414 |
415 string16 ChromeContentClient::GetLocalizedString(int message_id) const { | 415 string16 ChromeContentClient::GetLocalizedString(int message_id) const { |
416 return l10n_util::GetStringUTF16(message_id); | 416 return l10n_util::GetStringUTF16(message_id); |
417 } | 417 } |
418 | 418 |
419 base::StringPiece ChromeContentClient::GetDataResource(int resource_id) const { | 419 base::StringPiece ChromeContentClient::GetDataResource(int resource_id) const { |
420 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); | 420 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); |
421 } | 421 } |
422 | 422 |
| 423 base::StringPiece ChromeContentClient::GetImageResource( |
| 424 int resource_id, |
| 425 float scale_factor) const { |
| 426 // TODO(flackr): Pass scale_factor to ResourceBundle to get best matching |
| 427 // image resource for the given scale factor. |
| 428 return ResourceBundle::GetSharedInstance().GetRawDataResource(resource_id); |
| 429 } |
| 430 |
423 #if defined(OS_WIN) | 431 #if defined(OS_WIN) |
424 bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, | 432 bool ChromeContentClient::SandboxPlugin(CommandLine* command_line, |
425 sandbox::TargetPolicy* policy) { | 433 sandbox::TargetPolicy* policy) { |
426 std::wstring plugin_dll = command_line-> | 434 std::wstring plugin_dll = command_line-> |
427 GetSwitchValueNative(switches::kPluginPath); | 435 GetSwitchValueNative(switches::kPluginPath); |
428 | 436 |
429 FilePath builtin_flash; | 437 FilePath builtin_flash; |
430 if (!PathService::Get(chrome::FILE_FLASH_PLUGIN, &builtin_flash)) | 438 if (!PathService::Get(chrome::FILE_FLASH_PLUGIN, &builtin_flash)) |
431 return false; | 439 return false; |
432 | 440 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 | 507 |
500 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( | 508 bool ChromeContentClient::GetBundledFieldTrialPepperFlash( |
501 content::PepperPluginInfo* plugin, | 509 content::PepperPluginInfo* plugin, |
502 bool* override_npapi_flash) { | 510 bool* override_npapi_flash) { |
503 if (!ConductingPepperFlashFieldTrial()) | 511 if (!ConductingPepperFlashFieldTrial()) |
504 return false; | 512 return false; |
505 return GetBundledPepperFlash(plugin, override_npapi_flash); | 513 return GetBundledPepperFlash(plugin, override_npapi_flash); |
506 } | 514 } |
507 | 515 |
508 } // namespace chrome | 516 } // namespace chrome |
OLD | NEW |