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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 #if defined(TOOLKIT_USES_GTK) | 194 #if defined(TOOLKIT_USES_GTK) |
195 #include "ui/gfx/gtk_util.h" | 195 #include "ui/gfx/gtk_util.h" |
196 #endif | 196 #endif |
197 | 197 |
198 #if defined(TOUCH_UI) | 198 #if defined(TOUCH_UI) |
199 #include "ui/base/touch/touch_factory.h" | 199 #include "ui/base/touch/touch_factory.h" |
200 #endif | 200 #endif |
201 | 201 |
202 #if defined(USE_AURA) | 202 #if defined(USE_AURA) |
203 #include "chrome/browser/ui/views/aura/aura_init.h" | 203 #include "ui/aura/desktop.h" |
| 204 #include "ui/aura_shell/shell_factory.h" |
204 #include "ui/aura/desktop.h" | 205 #include "ui/aura/desktop.h" |
205 #endif | 206 #endif |
206 | 207 |
207 namespace net { | 208 namespace net { |
208 class NetLog; | 209 class NetLog; |
209 } // namespace net | 210 } // namespace net |
210 | 211 |
211 namespace { | 212 namespace { |
212 | 213 |
213 // This function provides some ways to test crash and assertion handling | 214 // This function provides some ways to test crash and assertion handling |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 | 1361 |
1361 // Convert active labs into switches. Modifies the current command line. | 1362 // Convert active labs into switches. Modifies the current command line. |
1362 about_flags::ConvertFlagsToSwitches(local_state, | 1363 about_flags::ConvertFlagsToSwitches(local_state, |
1363 CommandLine::ForCurrentProcess()); | 1364 CommandLine::ForCurrentProcess()); |
1364 | 1365 |
1365 // Reset the command line in the crash report details, since we may have | 1366 // Reset the command line in the crash report details, since we may have |
1366 // just changed it to include experiments. | 1367 // just changed it to include experiments. |
1367 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); | 1368 child_process_logging::SetCommandLine(CommandLine::ForCurrentProcess()); |
1368 | 1369 |
1369 #if defined(USE_AURA) | 1370 #if defined(USE_AURA) |
1370 browser::InitAuraDesktop(); | 1371 aura_shell::InitDesktopWindow(); |
1371 #elif defined(TOOLKIT_VIEWS) | 1372 #elif defined(TOOLKIT_VIEWS) |
1372 views::Widget::SetPureViews( | 1373 views::Widget::SetPureViews( |
1373 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); | 1374 CommandLine::ForCurrentProcess()->HasSwitch(switches::kUsePureViews)); |
1374 // Launch the views desktop shell window and register it as the default parent | 1375 // Launch the views desktop shell window and register it as the default parent |
1375 // for all unparented views widgets. | 1376 // for all unparented views widgets. |
1376 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { | 1377 if (parsed_command_line().HasSwitch(switches::kViewsDesktop)) { |
1377 std::string desktop_type_cmd = | 1378 std::string desktop_type_cmd = |
1378 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); | 1379 parsed_command_line().GetSwitchValueASCII(switches::kViewsDesktop); |
1379 if (desktop_type_cmd != "disabled") { | 1380 if (desktop_type_cmd != "disabled") { |
1380 views::desktop::DesktopWindowView::DesktopType desktop_type; | 1381 views::desktop::DesktopWindowView::DesktopType desktop_type; |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2081 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2081 (pre_read == "0" || pre_read == "1")) { | 2082 (pre_read == "0" || pre_read == "1")) { |
2082 std::string uma_name(name); | 2083 std::string uma_name(name); |
2083 uma_name += "_PreRead"; | 2084 uma_name += "_PreRead"; |
2084 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2085 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2085 AddPreReadHistogramTime(uma_name.c_str(), time); | 2086 AddPreReadHistogramTime(uma_name.c_str(), time); |
2086 } | 2087 } |
2087 #endif | 2088 #endif |
2088 #endif | 2089 #endif |
2089 } | 2090 } |
OLD | NEW |