Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: chrome/app/chrome_main_delegate.cc

Issue 1845343005: Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/app/resources/resources_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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"
53 #include "ui/base/resource/resource_bundle.h" 54 #include "ui/base/resource/resource_bundle.h"
54 #include "ui/base/ui_base_switches.h" 55 #include "ui/base/ui_base_switches.h"
55 56
56 #if defined(OS_WIN) 57 #if defined(OS_WIN)
57 #include <atlbase.h> 58 #include <atlbase.h>
58 #include <malloc.h> 59 #include <malloc.h>
59 #include <algorithm> 60 #include <algorithm>
60 #include "base/debug/close_handle_hook_win.h" 61 #include "base/debug/close_handle_hook_win.h"
61 #include "chrome/common/child_process_logging.h" 62 #include "chrome/common/child_process_logging.h"
62 #include "chrome/common/v8_breakpad_support_win.h" 63 #include "chrome/common/v8_breakpad_support_win.h"
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) { 777 for (size_t i = 0; i < arraysize(extra_pak_keys); ++i) {
777 pak_fd = global_descriptors->Get(extra_pak_keys[i]); 778 pak_fd = global_descriptors->Get(extra_pak_keys[i]);
778 pak_region = global_descriptors->GetRegion(extra_pak_keys[i]); 779 pak_region = global_descriptors->GetRegion(extra_pak_keys[i]);
779 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion( 780 ResourceBundle::GetSharedInstance().AddDataPackFromFileRegion(
780 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_100P); 781 base::File(pak_fd), pak_region, ui::SCALE_FACTOR_100P);
781 } 782 }
782 783
783 base::i18n::SetICUDefaultLocale(locale); 784 base::i18n::SetICUDefaultLocale(locale);
784 const std::string loaded_locale = locale; 785 const std::string loaded_locale = locale;
785 #else 786 #else
787 ui::MaterialDesignController::Initialize();
786 const std::string loaded_locale = 788 const std::string loaded_locale =
787 ui::ResourceBundle::InitSharedInstanceWithLocale( 789 ui::ResourceBundle::InitSharedInstanceWithLocale(
788 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); 790 locale, NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
789 791
790 base::FilePath resources_pack_path; 792 base::FilePath resources_pack_path;
791 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); 793 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path);
792 ResourceBundle::GetSharedInstance().AddDataPackFromPath( 794 ResourceBundle::GetSharedInstance().AddDataPackFromPath(
793 resources_pack_path, ui::SCALE_FACTOR_NONE); 795 resources_pack_path, ui::SCALE_FACTOR_NONE);
794 #endif 796 #endif
795 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << 797 CHECK(!loaded_locale.empty()) << "Locale could not be found for " <<
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 case version_info::Channel::CANARY: 1001 case version_info::Channel::CANARY:
1000 return true; 1002 return true;
1001 case version_info::Channel::DEV: 1003 case version_info::Channel::DEV:
1002 case version_info::Channel::BETA: 1004 case version_info::Channel::BETA:
1003 case version_info::Channel::STABLE: 1005 case version_info::Channel::STABLE:
1004 default: 1006 default:
1005 // Don't enable instrumentation. 1007 // Don't enable instrumentation.
1006 return false; 1008 return false;
1007 } 1009 }
1008 } 1010 }
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | chrome/app/resources/resources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698