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

Side by Side Diff: chrome/browser/browser_main.cc

Issue 7206055: Add an option to run Chrome in the views desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_views.h » ('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) 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/browser_main.h" 5 #include "chrome/browser/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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 #include "net/socket/tcp_client_socket.h" 107 #include "net/socket/tcp_client_socket.h"
108 #include "net/spdy/spdy_session.h" 108 #include "net/spdy/spdy_session.h"
109 #include "net/spdy/spdy_session_pool.h" 109 #include "net/spdy/spdy_session_pool.h"
110 #include "net/url_request/url_request.h" 110 #include "net/url_request/url_request.h"
111 #include "net/url_request/url_request_throttler_manager.h" 111 #include "net/url_request/url_request_throttler_manager.h"
112 #include "net/websockets/websocket_job.h" 112 #include "net/websockets/websocket_job.h"
113 #include "ui/base/l10n/l10n_util.h" 113 #include "ui/base/l10n/l10n_util.h"
114 #include "ui/base/resource/resource_bundle.h" 114 #include "ui/base/resource/resource_bundle.h"
115 #include "ui/gfx/gl/gl_implementation.h" 115 #include "ui/gfx/gl/gl_implementation.h"
116 #include "ui/gfx/gl/gl_switches.h" 116 #include "ui/gfx/gl/gl_switches.h"
117 #include "views/desktop/desktop_window.h"
117 118
118 #if defined(USE_LINUX_BREAKPAD) 119 #if defined(USE_LINUX_BREAKPAD)
119 #include "base/linux_util.h" 120 #include "base/linux_util.h"
120 #include "chrome/app/breakpad_linux.h" 121 #include "chrome/app/breakpad_linux.h"
121 #endif 122 #endif
122 123
123 #if defined(OS_POSIX) && !defined(OS_MACOSX) 124 #if defined(OS_POSIX) && !defined(OS_MACOSX)
124 #include <dbus/dbus-glib.h> 125 #include <dbus/dbus-glib.h>
125 126
126 #include "chrome/browser/browser_main_gtk.h" 127 #include "chrome/browser/browser_main_gtk.h"
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 // We don't support retention experiments on Mac or Linux. 1374 // We don't support retention experiments on Mac or Linux.
1374 return ResultCodes::NORMAL_EXIT; 1375 return ResultCodes::NORMAL_EXIT;
1375 #endif // defined(OS_WIN) 1376 #endif // defined(OS_WIN)
1376 } 1377 }
1377 1378
1378 #if defined(OS_CHROMEOS) 1379 #if defined(OS_CHROMEOS)
1379 // This needs to be called after the locale has been set. 1380 // This needs to be called after the locale has been set.
1380 RegisterTranslateableItems(); 1381 RegisterTranslateableItems();
1381 #endif 1382 #endif
1382 1383
1384 #if defined(TOOLKIT_VIEWS)
1385 // Launch the views desktop shell window and register it as the default parent
1386 // for all unparented views widgets.
1387 if (parsed_command_line.HasSwitch(switches::kViewsDesktop)) {
1388 views::desktop::DesktopWindow::CreateDesktopWindow();
1389 ChromeViewsDelegate* chrome_views_delegate =
1390 static_cast<ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate);
1391 chrome_views_delegate->default_parent_view =
1392 views::desktop::DesktopWindow::desktop_window;
1393 }
1394 #endif
1395
1383 BrowserInit browser_init; 1396 BrowserInit browser_init;
1384 1397
1385 // On first run, we need to process the predictor preferences before the 1398 // On first run, we need to process the predictor preferences before the
1386 // browser's profile_manager object is created, but after ResourceBundle 1399 // browser's profile_manager object is created, but after ResourceBundle
1387 // is initialized. 1400 // is initialized.
1388 FirstRun::MasterPrefs master_prefs; 1401 FirstRun::MasterPrefs master_prefs;
1389 bool first_run_ui_bypass = false; // True to skip first run UI. 1402 bool first_run_ui_bypass = false; // True to skip first run UI.
1390 if (is_first_run) { 1403 if (is_first_run) {
1391 first_run_ui_bypass = 1404 first_run_ui_bypass =
1392 !FirstRun::ProcessMasterPreferences(user_data_dir, &master_prefs); 1405 !FirstRun::ProcessMasterPreferences(user_data_dir, &master_prefs);
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 #if defined(OS_CHROMEOS) 1993 #if defined(OS_CHROMEOS)
1981 // To be precise, logout (browser shutdown) is not yet done, but the 1994 // To be precise, logout (browser shutdown) is not yet done, but the
1982 // remaining work is negligible, hence we say LogoutDone here. 1995 // remaining work is negligible, hence we say LogoutDone here.
1983 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", 1996 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone",
1984 false); 1997 false);
1985 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); 1998 chromeos::BootTimesLoader::Get()->WriteLogoutTimes();
1986 #endif 1999 #endif
1987 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); 2000 TRACE_EVENT_END_ETW("BrowserMain", 0, 0);
1988 return result_code; 2001 return result_code;
1989 } 2002 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698