Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| diff --git a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| index 14d80ecafdd11bacf235fe449a7c0d1b8fffed59..0dc11a78bbbf724e0792d4f36bf25f851ee2a123 100644 |
| --- a/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| +++ b/chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.cc |
| @@ -9,6 +9,7 @@ |
| #include "ash/shelf/shelf_model.h" |
| #include "ash/wm/window_state.h" |
| #include "ash/wm/window_util.h" |
| +#include "chrome/browser/extensions/webstore_install_prompt.h" |
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" |
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h" |
| #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| @@ -151,6 +152,18 @@ void AppWindowLauncherItemController::ActivateIndexedApp(size_t index) { |
| ShowAndActivateOrMinimize(*it); |
| } |
| +void AppWindowLauncherItemController::InstallApp() { |
| + AppWindow* parent_window = |
| + last_active_app_window_ ? last_active_app_window_ : app_windows_.back(); |
| + scoped_refptr<extensions::WebstoreInstallPrompt> installer = |
| + new extensions::WebstoreInstallPrompt( |
| + app_id(), |
| + launcher_controller()->profile(), |
| + parent_window ? parent_window->GetNativeWindow() : NULL, |
|
Mr4D (OOO till 08-26)
2014/05/28 15:42:15
I am not quite sure that I understand why you need
tmdiep
2014/05/28 23:22:20
The purpose of the window is for positioning the i
|
| + extensions::WebstoreInstallPrompt::Callback()); |
| + installer->BeginInstall(); |
| +} |
| + |
| ChromeLauncherAppMenuItems AppWindowLauncherItemController::GetApplicationList( |
| int event_flags) { |
| ChromeLauncherAppMenuItems items; |