| 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/cpu.h" | 8 #include "base/cpu.h" |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 base::RefCountedStaticMemory* ChromeContentClient::GetDataResourceBytes( | 515 base::RefCountedStaticMemory* ChromeContentClient::GetDataResourceBytes( |
| 516 int resource_id) const { | 516 int resource_id) const { |
| 517 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); | 517 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); |
| 518 } | 518 } |
| 519 | 519 |
| 520 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const { | 520 gfx::Image& ChromeContentClient::GetNativeImageNamed(int resource_id) const { |
| 521 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); | 521 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); |
| 522 } | 522 } |
| 523 | 523 |
| 524 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) { | 524 std::string ChromeContentClient::GetProcessTypeNameInEnglish(int type) { |
| 525 // If any of these names are changed or new ones added, update |
| 526 // extract_action.py's AddBadMessageActions. |
| 525 switch (type) { | 527 switch (type) { |
| 526 case PROCESS_TYPE_NACL_LOADER: | 528 case PROCESS_TYPE_NACL_LOADER: |
| 527 return "Native Client module"; | 529 return "Native Client module"; |
| 528 case PROCESS_TYPE_NACL_BROKER: | 530 case PROCESS_TYPE_NACL_BROKER: |
| 529 return "Native Client broker"; | 531 return "Native Client broker"; |
| 530 } | 532 } |
| 531 | 533 |
| 532 DCHECK(false) << "Unknown child process type!"; | 534 DCHECK(false) << "Unknown child process type!"; |
| 533 return "Unknown"; | 535 return "Unknown"; |
| 534 } | 536 } |
| 535 | 537 |
| 536 #if defined(OS_MACOSX) && !defined(OS_IOS) | 538 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 537 bool ChromeContentClient::GetSandboxProfileForSandboxType( | 539 bool ChromeContentClient::GetSandboxProfileForSandboxType( |
| 538 int sandbox_type, | 540 int sandbox_type, |
| 539 int* sandbox_profile_resource_id) const { | 541 int* sandbox_profile_resource_id) const { |
| 540 DCHECK(sandbox_profile_resource_id); | 542 DCHECK(sandbox_profile_resource_id); |
| 541 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { | 543 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { |
| 542 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; | 544 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; |
| 543 return true; | 545 return true; |
| 544 } | 546 } |
| 545 return false; | 547 return false; |
| 546 } | 548 } |
| 547 | 549 |
| 548 std::string ChromeContentClient::GetCarbonInterposePath() const { | 550 std::string ChromeContentClient::GetCarbonInterposePath() const { |
| 549 return std::string(kInterposeLibraryPath); | 551 return std::string(kInterposeLibraryPath); |
| 550 } | 552 } |
| 551 #endif | 553 #endif |
| OLD | NEW |