Skip to content

Commit

Permalink
Make the context menu of v1 packaged app works for changing launch wi…
Browse files Browse the repository at this point in the history
…ndow type in app launcher

BUG=159651,161817

Review URL: https://chromiumcodereview.appspot.com/11414151

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169623 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
hongbo.min@intel.com committed Nov 27, 2012
1 parent a1003e2 commit 7fd09aa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions chrome/browser/ui/views/app_list/app_list_controller_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "base/win/shortcut.h"
#include "chrome/app/chrome_dll_resource.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_prefs.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile.h"
Expand Down Expand Up @@ -206,8 +207,16 @@ void AppListControllerDelegateWin::LaunchApp(Profile* profile,
const extensions::Extension* extension = service->GetInstalledExtension(
extension_id);
DCHECK(extension);
application_launch::OpenApplication(application_launch::LaunchParams(
profile, extension, extension_misc::LAUNCH_TAB, NEW_FOREGROUND_TAB));

// Look up the app preference to find out the right launch container. Default
// is to launch as a regular tab.
extension_misc::LaunchContainer launch_container =
service->extension_prefs()->GetLaunchContainer(extension,
extensions::ExtensionPrefs::LAUNCH_REGULAR);

application_launch::LaunchParams params(profile, extension, launch_container,
NEW_FOREGROUND_TAB);
application_launch::OpenApplication(params);
}

void AppListController::ShowAppList() {
Expand Down

0 comments on commit 7fd09aa

Please sign in to comment.