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

Unified Diff: chrome/browser/ui/extensions/application_launch.cc

Issue 11183072: Merge 162290 - Attempt to reuse an existing Browser instance for application launches in Chrome on … (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/application_launch.cc
===================================================================
--- chrome/browser/ui/extensions/application_launch.cc (revision 162796)
+++ chrome/browser/ui/extensions/application_launch.cc (working copy)
@@ -31,6 +31,10 @@
#include "content/public/common/renderer_preferences.h"
#include "ui/gfx/rect.h"
+#if defined(OS_WIN)
+#include "base/win/metro.h"
+#endif
+
using content::WebContents;
using extensions::Extension;
using extensions::ExtensionPrefs;
@@ -108,7 +112,18 @@
}
#endif
- Browser* browser = new Browser(params);
+ Browser* browser = NULL;
+#if defined(OS_WIN)
+ // In Chrome on Windows 8 in metro mode we don't allow multiple chrome
+ // windows to be created, as we don't have a good way to switch between
+ // them. We attempt to reuse an existing Browser window.
+ if (base::win::IsMetroProcess()) {
+ browser = browser::FindBrowserWithProfile(
+ profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
+ }
+#endif
+ if (!browser)
+ browser = new Browser(params);
if (app_browser)
*app_browser = browser;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698