| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" | 58 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" |
| 59 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" | 59 #include "chrome/browser/chromeos/power/peripheral_battery_observer.h" |
| 60 #include "chrome/browser/chromeos/power/power_button_observer.h" | 60 #include "chrome/browser/chromeos/power/power_button_observer.h" |
| 61 #include "chrome/browser/chromeos/power/power_data_collector.h" | 61 #include "chrome/browser/chromeos/power/power_data_collector.h" |
| 62 #include "chrome/browser/chromeos/power/power_prefs.h" | 62 #include "chrome/browser/chromeos/power/power_prefs.h" |
| 63 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 63 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 64 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" | 64 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h
" |
| 65 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 65 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 66 #include "chrome/browser/chromeos/settings/owner_key_util.h" | 66 #include "chrome/browser/chromeos/settings/owner_key_util.h" |
| 67 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 67 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 68 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 68 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 69 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
| 69 #include "chrome/browser/defaults.h" | 70 #include "chrome/browser/defaults.h" |
| 70 #include "chrome/browser/metrics/metrics_service.h" | 71 #include "chrome/browser/metrics/metrics_service.h" |
| 71 #include "chrome/browser/net/chrome_network_delegate.h" | 72 #include "chrome/browser/net/chrome_network_delegate.h" |
| 72 #include "chrome/browser/profiles/profile.h" | 73 #include "chrome/browser/profiles/profile.h" |
| 73 #include "chrome/browser/profiles/profile_manager.h" | 74 #include "chrome/browser/profiles/profile_manager.h" |
| 74 #include "chrome/browser/rlz/rlz.h" | 75 #include "chrome/browser/rlz/rlz.h" |
| 75 #include "chrome/common/chrome_constants.h" | 76 #include "chrome/common/chrome_constants.h" |
| 76 #include "chrome/common/chrome_paths.h" | 77 #include "chrome/common/chrome_paths.h" |
| 77 #include "chrome/common/chrome_switches.h" | 78 #include "chrome/common/chrome_switches.h" |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 // -- immediately after ChildProcess::WaitForDebugger(). | 708 // -- immediately after ChildProcess::WaitForDebugger(). |
| 708 | 709 |
| 709 // Start the out-of-memory priority manager here so that we give the most | 710 // Start the out-of-memory priority manager here so that we give the most |
| 710 // amount of time for the other services to start up before we start | 711 // amount of time for the other services to start up before we start |
| 711 // adjusting the oom priority. | 712 // adjusting the oom priority. |
| 712 g_browser_process->platform_part()->oom_priority_manager()->Start(); | 713 g_browser_process->platform_part()->oom_priority_manager()->Start(); |
| 713 | 714 |
| 714 if (ui::ShouldDefaultToNaturalScroll()) { | 715 if (ui::ShouldDefaultToNaturalScroll()) { |
| 715 CommandLine::ForCurrentProcess()->AppendSwitch( | 716 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 716 chromeos::switches::kNaturalScrollDefault); | 717 chromeos::switches::kNaturalScrollDefault); |
| 717 ui::SetNaturalScroll(true); | 718 system::InputDeviceSettings::Get()->SetTapToClick(true); |
| 718 } | 719 } |
| 719 | 720 |
| 720 ChromeBrowserMainPartsLinux::PreBrowserStart(); | 721 ChromeBrowserMainPartsLinux::PreBrowserStart(); |
| 721 } | 722 } |
| 722 | 723 |
| 723 void ChromeBrowserMainPartsChromeos::PostBrowserStart() { | 724 void ChromeBrowserMainPartsChromeos::PostBrowserStart() { |
| 724 // These are dependent on the ash::Shell singleton already having been | 725 // These are dependent on the ash::Shell singleton already having been |
| 725 // initialized. | 726 // initialized. |
| 726 power_button_observer_.reset(new PowerButtonObserver); | 727 power_button_observer_.reset(new PowerButtonObserver); |
| 727 data_promo_notification_.reset(new DataPromoNotification()), | 728 data_promo_notification_.reset(new DataPromoNotification()), |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 830 // Destroy DBus services immediately after threads are stopped. | 831 // Destroy DBus services immediately after threads are stopped. |
| 831 dbus_services_.reset(); | 832 dbus_services_.reset(); |
| 832 | 833 |
| 833 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 834 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
| 834 | 835 |
| 835 // Destroy DeviceSettingsService after g_browser_process. | 836 // Destroy DeviceSettingsService after g_browser_process. |
| 836 DeviceSettingsService::Shutdown(); | 837 DeviceSettingsService::Shutdown(); |
| 837 } | 838 } |
| 838 | 839 |
| 839 } // namespace chromeos | 840 } // namespace chromeos |
| OLD | NEW |