Chromium Code Reviews| Index: chrome/browser/ui/extensions/application_launch.cc |
| =================================================================== |
| --- chrome/browser/ui/extensions/application_launch.cc (revision 161954) |
| +++ 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,17 @@ |
| } |
| #endif |
| - Browser* browser = new Browser(params); |
| + Browser* browser = NULL; |
| +#if defined(OS_WIN) |
| + // In Chrome on Windows 8 in metro mode we attempt to reuse an existing |
|
Mihai Parparita -not on Chrome
2012/10/16 23:57:18
This comment just repeats what the code does. Can
ananta
2012/10/17 00:06:06
Done.
|
| + // Browser window if one exists. |
| + 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; |