Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/browser/chromeos/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 #include "content/public/browser/media_capture_devices.h" | 146 #include "content/public/browser/media_capture_devices.h" |
| 147 #include "content/public/browser/notification_service.h" | 147 #include "content/public/browser/notification_service.h" |
| 148 #include "content/public/common/content_switches.h" | 148 #include "content/public/common/content_switches.h" |
| 149 #include "content/public/common/main_function_params.h" | 149 #include "content/public/common/main_function_params.h" |
| 150 #include "crypto/nss_util_internal.h" | 150 #include "crypto/nss_util_internal.h" |
| 151 #include "crypto/scoped_nss_types.h" | 151 #include "crypto/scoped_nss_types.h" |
| 152 #include "dbus/object_path.h" | 152 #include "dbus/object_path.h" |
| 153 #include "device/bluetooth/bluetooth_adapter_factory.h" | 153 #include "device/bluetooth/bluetooth_adapter_factory.h" |
| 154 #include "device/bluetooth/dbus/bluez_dbus_manager.h" | 154 #include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| 155 #include "media/audio/sounds/sounds_manager.h" | 155 #include "media/audio/sounds/sounds_manager.h" |
| 156 #include "media/base/media_switches.h" | |
| 156 #include "net/base/network_change_notifier.h" | 157 #include "net/base/network_change_notifier.h" |
| 157 #include "net/cert/nss_cert_database.h" | 158 #include "net/cert/nss_cert_database.h" |
| 158 #include "net/cert/nss_cert_database_chromeos.h" | 159 #include "net/cert/nss_cert_database_chromeos.h" |
| 159 #include "net/url_request/url_request.h" | 160 #include "net/url_request/url_request.h" |
| 160 #include "net/url_request/url_request_context_getter.h" | 161 #include "net/url_request/url_request_context_getter.h" |
| 161 #include "printing/backend/print_backend.h" | 162 #include "printing/backend/print_backend.h" |
| 162 #include "rlz/features/features.h" | 163 #include "rlz/features/features.h" |
| 163 #include "third_party/cros_system_api/dbus/service_constants.h" | 164 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 164 #include "ui/base/ime/chromeos/ime_keyboard.h" | 165 #include "ui/base/ime/chromeos/ime_keyboard.h" |
| 165 #include "ui/base/ime/chromeos/input_method_manager.h" | 166 #include "ui/base/ime/chromeos/input_method_manager.h" |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 907 | 908 |
| 908 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 909 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 909 // -- immediately after ChildProcess::WaitForDebugger(). | 910 // -- immediately after ChildProcess::WaitForDebugger(). |
| 910 | 911 |
| 911 if (ui::ShouldDefaultToNaturalScroll()) { | 912 if (ui::ShouldDefaultToNaturalScroll()) { |
| 912 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 913 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 913 chromeos::switches::kNaturalScrollDefault); | 914 chromeos::switches::kNaturalScrollDefault); |
| 914 system::InputDeviceSettings::Get()->SetTapToClick(true); | 915 system::InputDeviceSettings::Get()->SetTapToClick(true); |
| 915 } | 916 } |
| 916 | 917 |
| 918 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 919 ::switches::kEnableInternalMediaSession); | |
|
Daniel Erat
2017/05/17 01:22:25
it seems strange to do this programmatically here.
Qiang(Joe) Xu
2017/05/22 22:58:47
I moved it to ChromeShellDelegate::PreInit(), is t
| |
| 920 | |
| 917 ChromeBrowserMainPartsLinux::PreBrowserStart(); | 921 ChromeBrowserMainPartsLinux::PreBrowserStart(); |
| 918 } | 922 } |
| 919 | 923 |
| 920 void ChromeBrowserMainPartsChromeos::PostBrowserStart() { | 924 void ChromeBrowserMainPartsChromeos::PostBrowserStart() { |
| 921 if (!ash_util::IsRunningInMash()) { | 925 if (!ash_util::IsRunningInMash()) { |
| 922 system::InputDeviceSettings::Get()->UpdateTouchDevicesStatusFromPrefs(); | 926 system::InputDeviceSettings::Get()->UpdateTouchDevicesStatusFromPrefs(); |
| 923 | 927 |
| 924 // These are dependent on the ash::Shell singleton already having been | 928 // These are dependent on the ash::Shell singleton already having been |
| 925 // initialized. Consequently, these cannot be used when running as a mus | 929 // initialized. Consequently, these cannot be used when running as a mus |
| 926 // client. | 930 // client. |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1092 | 1096 |
| 1093 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 1097 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 1094 | 1098 |
| 1095 // Destroy DeviceSettingsService after g_browser_process. | 1099 // Destroy DeviceSettingsService after g_browser_process. |
| 1096 DeviceSettingsService::Shutdown(); | 1100 DeviceSettingsService::Shutdown(); |
| 1097 | 1101 |
| 1098 chromeos::ShutdownCloseTracking(); | 1102 chromeos::ShutdownCloseTracking(); |
| 1099 } | 1103 } |
| 1100 | 1104 |
| 1101 } // namespace chromeos | 1105 } // namespace chromeos |
| OLD | NEW |