| 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 78548d843f1770c1da2402e30cb077b8a1116dac..ee76101a371a4717cc021f7f6d6673be82d55825 100644
|
| --- a/chrome/browser/extensions/platform_app_launcher.cc
|
| +++ b/chrome/browser/extensions/platform_app_launcher.cc
|
| @@ -18,6 +18,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"
|
| @@ -29,6 +30,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;
|
| @@ -245,6 +250,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);
|
|
|