| Index: chrome/browser/extensions/platform_app_launcher.cc
|
| diff --git a/chrome/browser/extensions/platform_app_launcher.cc b/chrome/browser/extensions/platform_app_launcher.cc
|
| index 0d376098286f04c772a77002469e11c72bc0e94a..74f25512f8acb4ed2aa3c970adc35f700c7baac9 100644
|
| --- a/chrome/browser/extensions/platform_app_launcher.cc
|
| +++ b/chrome/browser/extensions/platform_app_launcher.cc
|
| @@ -21,6 +21,7 @@
|
| #include "chrome/browser/extensions/extension_system.h"
|
| #include "chrome/browser/extensions/lazy_background_task_queue.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/ui/extensions/app_metro_infobar_delegate_win.h"
|
| #include "chrome/common/extensions/extension.h"
|
| #include "chrome/common/extensions/extension_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -32,6 +33,10 @@
|
| #include "webkit/fileapi/file_system_types.h"
|
| #include "webkit/fileapi/isolated_context.h"
|
|
|
| +#if defined(OS_WIN)
|
| +#include "win8/util/win8_util.h"
|
| +#endif
|
| +
|
| using content::BrowserThread;
|
| using extensions::app_file_handler_util::FileHandlerForId;
|
| using extensions::app_file_handler_util::FileHandlerCanHandleFileWithMimeType;
|
| @@ -315,6 +320,16 @@ void LaunchPlatformApp(Profile* profile,
|
| const Extension* extension,
|
| const CommandLine* command_line,
|
| const base::FilePath& current_directory) {
|
| +#if defined(OS_WIN)
|
| + // On Windows 8's single window Metro mode we can not launch platform apps.
|
| + // Offer to switch Chrome to desktop mode.
|
| + if (win8::IsSingleWindowMetroMode()) {
|
| + chrome::AppMetroInfoBarDelegateWin::CreateAndActivateMetroForApp(
|
| + profile, extension->id());
|
| + return;
|
| + }
|
| +#endif
|
| +
|
| base::FilePath path;
|
| if (!GetAbsolutePathFromCommandLine(command_line, current_directory, &path)) {
|
| LaunchPlatformAppWithNoData(profile, extension);
|
|
|