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/app/chrome_main_delegate.h" | 5 #include "chrome/app/chrome_main_delegate.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); | 731 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); |
732 CHECK(pak_fd != -1); | 732 CHECK(pak_fd != -1); |
733 ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 733 ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
734 base::File(pak_fd), ui::SCALE_FACTOR_100P); | 734 base::File(pak_fd), ui::SCALE_FACTOR_100P); |
735 } | 735 } |
736 | 736 |
737 base::i18n::SetICUDefaultLocale(locale); | 737 base::i18n::SetICUDefaultLocale(locale); |
738 const std::string loaded_locale = locale; | 738 const std::string loaded_locale = locale; |
739 #else | 739 #else |
740 const std::string loaded_locale = | 740 const std::string loaded_locale = |
741 ResourceBundle::InitSharedInstanceWithLocale(locale, NULL); | 741 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 742 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
742 | 743 |
743 base::FilePath resources_pack_path; | 744 base::FilePath resources_pack_path; |
744 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 745 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
745 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 746 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
746 resources_pack_path, ui::SCALE_FACTOR_NONE); | 747 resources_pack_path, ui::SCALE_FACTOR_NONE); |
747 #endif | 748 #endif |
748 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 749 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
749 locale; | 750 locale; |
750 | 751 |
751 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) | 752 #if !defined(CHROME_MULTIPLE_DLL_BROWSER) |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 } | 922 } |
922 | 923 |
923 content::ContentUtilityClient* | 924 content::ContentUtilityClient* |
924 ChromeMainDelegate::CreateContentUtilityClient() { | 925 ChromeMainDelegate::CreateContentUtilityClient() { |
925 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 926 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
926 return NULL; | 927 return NULL; |
927 #else | 928 #else |
928 return g_chrome_content_utility_client.Pointer(); | 929 return g_chrome_content_utility_client.Pointer(); |
929 #endif | 930 #endif |
930 } | 931 } |
OLD | NEW |