| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 #if defined(OS_ANDROID) | 655 #if defined(OS_ANDROID) |
| 656 // The renderer sandbox prevents us from accessing our .pak files directly. | 656 // The renderer sandbox prevents us from accessing our .pak files directly. |
| 657 // Therefore file descriptors to the .pak files that we need are passed in | 657 // Therefore file descriptors to the .pak files that we need are passed in |
| 658 // at process creation time. | 658 // at process creation time. |
| 659 int locale_pak_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( | 659 int locale_pak_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
| 660 kAndroidLocalePakDescriptor); | 660 kAndroidLocalePakDescriptor); |
| 661 CHECK(locale_pak_fd != -1); | 661 CHECK(locale_pak_fd != -1); |
| 662 ResourceBundle::InitSharedInstanceWithPakFile(locale_pak_fd, false); | 662 ResourceBundle::InitSharedInstanceWithPakFile(locale_pak_fd, false); |
| 663 | 663 |
| 664 int extra_pak_keys[] = { | 664 int extra_pak_keys[] = { |
| 665 kAndroidChromePakDescriptor, | |
| 666 kAndroidChrome100PercentPakDescriptor, | 665 kAndroidChrome100PercentPakDescriptor, |
| 667 kAndroidUIResourcesPakDescriptor, | 666 kAndroidUIResourcesPakDescriptor, |
| 668 }; | 667 }; |
| 669 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { | 668 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { |
| 670 int pak_fd = | 669 int pak_fd = |
| 671 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); | 670 base::GlobalDescriptors::GetInstance()->MaybeGet(extra_pak_keys[i]); |
| 672 CHECK(pak_fd != -1); | 671 CHECK(pak_fd != -1); |
| 673 ResourceBundle::GetSharedInstance().AddDataPackFromFile( | 672 ResourceBundle::GetSharedInstance().AddDataPackFromFile( |
| 674 pak_fd, ui::SCALE_FACTOR_100P); | 673 pak_fd, ui::SCALE_FACTOR_100P); |
| 675 } | 674 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 } | 846 } |
| 848 | 847 |
| 849 content::ContentUtilityClient* | 848 content::ContentUtilityClient* |
| 850 ChromeMainDelegate::CreateContentUtilityClient() { | 849 ChromeMainDelegate::CreateContentUtilityClient() { |
| 851 #if defined(CHROME_MULTIPLE_DLL_BROWSER) | 850 #if defined(CHROME_MULTIPLE_DLL_BROWSER) |
| 852 return NULL; | 851 return NULL; |
| 853 #else | 852 #else |
| 854 return &g_chrome_content_utility_client.Get(); | 853 return &g_chrome_content_utility_client.Get(); |
| 855 #endif | 854 #endif |
| 856 } | 855 } |
| OLD | NEW |