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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_views.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_main.cc
===================================================================
--- chrome/browser/browser_main.cc (revision 89890)
+++ chrome/browser/browser_main.cc (working copy)
@@ -114,6 +114,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/gl/gl_implementation.h"
#include "ui/gfx/gl/gl_switches.h"
+#include "views/desktop/desktop_window.h"
#if defined(USE_LINUX_BREAKPAD)
#include "base/linux_util.h"
@@ -1380,6 +1381,18 @@
RegisterTranslateableItems();
#endif
+#if defined(TOOLKIT_VIEWS)
+ // Launch the views desktop shell window and register it as the default parent
+ // for all unparented views widgets.
+ if (parsed_command_line.HasSwitch(switches::kViewsDesktop)) {
+ views::desktop::DesktopWindow::CreateDesktopWindow();
+ ChromeViewsDelegate* chrome_views_delegate =
+ static_cast<ChromeViewsDelegate*>(views::ViewsDelegate::views_delegate);
+ chrome_views_delegate->default_parent_view =
+ views::desktop::DesktopWindow::desktop_window;
+ }
+#endif
+
BrowserInit browser_init;
// On first run, we need to process the predictor preferences before the
« 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