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