Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc |
| diff --git a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc |
| index 425caa8329826c15495861bea758c5bceffca420..a9834e033a7d63198ed53848b77f087a5a0de940 100644 |
| --- a/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc |
| +++ b/chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc |
| @@ -4,6 +4,7 @@ |
| #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.h" |
| +#include "ash/shelf/shelf_delegate.h" |
| #include "ash/shelf/shelf_util.h" |
| #include "ash/shell.h" |
| #include "ash/wm/window_util.h" |
| @@ -33,7 +34,7 @@ std::string GetAppShelfId(AppWindow* app_window) { |
| ExtensionAppWindowLauncherController::ExtensionAppWindowLauncherController( |
| ChromeLauncherController* owner) |
| : AppWindowLauncherController(owner) { |
| - AppWindowRegistry* registry = AppWindowRegistry::Get(owner->profile()); |
| + AppWindowRegistry* registry = AppWindowRegistry::Get(owner->GetProfile()); |
| registry_.insert(registry); |
| registry->AddObserver(this); |
| } |
| @@ -139,7 +140,9 @@ void ExtensionAppWindowLauncherController::RegisterApp(AppWindow* app_window) { |
| // If the app shelf id is not unique, and there is already a shelf |
| // item for this app id (e.g. pinned), use that shelf item. |
| if (app_shelf_id == app_id) |
|
msw
2016/06/10 22:44:39
nit: curly braces
mfomitchev
2016/06/13 17:29:18
Done.
|
| - shelf_id = owner()->GetShelfIDForAppID(app_id); |
| + shelf_id = |
| + ash::Shell::GetInstance()->GetShelfDelegate()->GetShelfIDForAppID( |
| + app_id); |
| if (shelf_id == 0) { |
| shelf_id = owner()->CreateAppLauncherItem(controller, app_id, status); |
| // Restore any existing app icon and flag as set. |