OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 #include "chrome/browser/chromeos/cros/cros_library.h" | 136 #include "chrome/browser/chromeos/cros/cros_library.h" |
137 #include "chrome/browser/chromeos/cros/screen_lock_library.h" | 137 #include "chrome/browser/chromeos/cros/screen_lock_library.h" |
138 #include "chrome/browser/chromeos/customization_document.h" | 138 #include "chrome/browser/chromeos/customization_document.h" |
139 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 139 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
140 #include "chrome/browser/chromeos/external_metrics.h" | 140 #include "chrome/browser/chromeos/external_metrics.h" |
141 #include "chrome/browser/chromeos/login/authenticator.h" | 141 #include "chrome/browser/chromeos/login/authenticator.h" |
142 #include "chrome/browser/chromeos/login/login_utils.h" | 142 #include "chrome/browser/chromeos/login/login_utils.h" |
143 #include "chrome/browser/chromeos/login/ownership_service.h" | 143 #include "chrome/browser/chromeos/login/ownership_service.h" |
144 #include "chrome/browser/chromeos/login/screen_locker.h" | 144 #include "chrome/browser/chromeos/login/screen_locker.h" |
145 #include "chrome/browser/chromeos/login/user_manager.h" | 145 #include "chrome/browser/chromeos/login/user_manager.h" |
| 146 #include "chrome/browser/chromeos/system/runtime_environment.h" |
146 #include "chrome/browser/chromeos/system_key_event_listener.h" | 147 #include "chrome/browser/chromeos/system_key_event_listener.h" |
147 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | 148 #include "chrome/browser/chromeos/user_cros_settings_provider.h" |
148 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 149 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
149 #include "chrome/browser/oom_priority_manager.h" | 150 #include "chrome/browser/oom_priority_manager.h" |
150 #include "chrome/browser/ui/views/browser_dialogs.h" | 151 #include "chrome/browser/ui/views/browser_dialogs.h" |
151 #endif | 152 #endif |
152 | 153 |
153 // TODO(port): several win-only methods have been pulled out of this, but | 154 // TODO(port): several win-only methods have been pulled out of this, but |
154 // BrowserMain() as a whole needs to be broken apart so that it's usable by | 155 // BrowserMain() as a whole needs to be broken apart so that it's usable by |
155 // other platforms. For now, it's just a stub. This is a serious work in | 156 // other platforms. For now, it's just a stub. This is a serious work in |
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1340 // call to ConvertFlagsToSwitches in the following line. | 1341 // call to ConvertFlagsToSwitches in the following line. |
1341 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) | 1342 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) |
1342 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, | 1343 CommandLine::ForCurrentProcess()->AppendSwitchASCII(switches::kViewsDesktop, |
1343 "other"); | 1344 "other"); |
1344 #elif defined(USE_AURA) && defined(OS_LINUX) | 1345 #elif defined(USE_AURA) && defined(OS_LINUX) |
1345 // Always add the --views-desktop flag, if not already set. | 1346 // Always add the --views-desktop flag, if not already set. |
1346 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) | 1347 if (!parsed_command_line().HasSwitch(switches::kViewsDesktop)) |
1347 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kViewsDesktop); | 1348 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kViewsDesktop); |
1348 #endif | 1349 #endif |
1349 | 1350 |
| 1351 #if defined(USE_AURA) && defined(OS_CHROMEOS) |
| 1352 if (chromeos::system::runtime_environment::IsRunningOnChromeOS()) |
| 1353 aura::Desktop::set_use_fullscreen_host_window(true); |
| 1354 #endif |
| 1355 |
1350 // Always add the --block-reading-third-party-cookies flag, if not already | 1356 // Always add the --block-reading-third-party-cookies flag, if not already |
1351 // set. We'll leave this on for a bit to determine if we Break The Web for | 1357 // set. We'll leave this on for a bit to determine if we Break The Web for |
1352 // Canary users. | 1358 // Canary users. |
1353 // | 1359 // |
1354 // TODO(mkwst): Remove this once impact is clear (http://crbug.com/98241). | 1360 // TODO(mkwst): Remove this once impact is clear (http://crbug.com/98241). |
1355 if (!parsed_command_line().HasSwitch( | 1361 if (!parsed_command_line().HasSwitch( |
1356 switches::kBlockReadingThirdPartyCookies)) | 1362 switches::kBlockReadingThirdPartyCookies)) |
1357 CommandLine::ForCurrentProcess()->AppendSwitch( | 1363 CommandLine::ForCurrentProcess()->AppendSwitch( |
1358 switches::kBlockReadingThirdPartyCookies); | 1364 switches::kBlockReadingThirdPartyCookies); |
1359 | 1365 |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2102 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2097 (pre_read == "0" || pre_read == "1")) { | 2103 (pre_read == "0" || pre_read == "1")) { |
2098 std::string uma_name(name); | 2104 std::string uma_name(name); |
2099 uma_name += "_PreRead"; | 2105 uma_name += "_PreRead"; |
2100 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2106 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2101 AddPreReadHistogramTime(uma_name.c_str(), time); | 2107 AddPreReadHistogramTime(uma_name.c_str(), time); |
2102 } | 2108 } |
2103 #endif | 2109 #endif |
2104 #endif | 2110 #endif |
2105 } | 2111 } |
OLD | NEW |