| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "chrome/renderer/chrome_content_renderer_client.h" | 43 #include "chrome/renderer/chrome_content_renderer_client.h" |
| 44 #include "chrome/utility/chrome_content_utility_client.h" | 44 #include "chrome/utility/chrome_content_utility_client.h" |
| 45 #include "components/component_updater/component_updater_paths.h" | 45 #include "components/component_updater/component_updater_paths.h" |
| 46 #include "components/content_settings/core/common/content_settings_pattern.h" | 46 #include "components/content_settings/core/common/content_settings_pattern.h" |
| 47 #include "components/crash/content/app/crash_reporter_client.h" | 47 #include "components/crash/content/app/crash_reporter_client.h" |
| 48 #include "components/version_info/version_info.h" | 48 #include "components/version_info/version_info.h" |
| 49 #include "content/public/common/content_client.h" | 49 #include "content/public/common/content_client.h" |
| 50 #include "content/public/common/content_paths.h" | 50 #include "content/public/common/content_paths.h" |
| 51 #include "content/public/common/content_switches.h" | 51 #include "content/public/common/content_switches.h" |
| 52 #include "extensions/common/constants.h" | 52 #include "extensions/common/constants.h" |
| 53 #include "ui/base/material_design/material_design_controller.h" | |
| 54 #include "ui/base/resource/resource_bundle.h" | 53 #include "ui/base/resource/resource_bundle.h" |
| 55 #include "ui/base/ui_base_switches.h" | 54 #include "ui/base/ui_base_switches.h" |
| 56 | 55 |
| 57 #if defined(OS_WIN) | 56 #if defined(OS_WIN) |
| 58 #include <atlbase.h> | 57 #include <atlbase.h> |
| 59 #include <malloc.h> | 58 #include <malloc.h> |
| 60 #include <algorithm> | 59 #include <algorithm> |
| 61 #include "base/debug/close_handle_hook_win.h" | 60 #include "base/debug/close_handle_hook_win.h" |
| 62 #include "chrome/common/child_process_logging.h" | 61 #include "chrome/common/child_process_logging.h" |
| 63 #include "chrome/common/v8_breakpad_support_win.h" | 62 #include "chrome/common/v8_breakpad_support_win.h" |
| (...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { | 776 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { |
| 778 pak_fd = global_descriptors->Get(extra_pak_keys[i]); | 777 pak_fd = global_descriptors->Get(extra_pak_keys[i]); |
| 779 pak_region = global_descriptors->GetRegion(extra_pak_keys[i]); | 778 pak_region = global_descriptors->GetRegion(extra_pak_keys[i]); |
| 780 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( | 779 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( |
| 781 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_100P); | 780 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_100P); |
| 782 } | 781 } |
| 783 | 782 |
| 784 base::i18n::SetICUDefaultLocale(locale); | 783 base::i18n::SetICUDefaultLocale(locale); |
| 785 const std::string loaded_locale = locale; | 784 const std::string loaded_locale = locale; |
| 786 #else | 785 #else |
| 787 ui::MaterialDesignController::Initialize(); | |
| 788 const std::string loaded_locale = | 786 const std::string loaded_locale = |
| 789 ui::ResourceBundle::InitSharedInstanceWithLocale( | 787 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 790 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 788 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
| 791 | 789 |
| 792 base::FilePath resources_pack_path; | 790 base::FilePath resources_pack_path; |
| 793 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 791 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 794 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 792 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
| 795 resources_pack_path, ui::SCALE_FACTOR_NONE); | 793 resources_pack_path, ui::SCALE_FACTOR_NONE); |
| 796 #endif | 794 #endif |
| 797 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << | 795 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1001 case version_info::Channel::CANARY: | 999 case version_info::Channel::CANARY: |
| 1002 return true; | 1000 return true; |
| 1003 case version_info::Channel::DEV: | 1001 case version_info::Channel::DEV: |
| 1004 case version_info::Channel::BETA: | 1002 case version_info::Channel::BETA: |
| 1005 case version_info::Channel::STABLE: | 1003 case version_info::Channel::STABLE: |
| 1006 default: | 1004 default: |
| 1007 // Don't enable instrumentation. | 1005 // Don't enable instrumentation. |
| 1008 return false; | 1006 return false; |
| 1009 } | 1007 } |
| 1010 } | 1008 } |
| OLD | NEW |