Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4757)

Unified Diff: chrome/browser/ui/ash/launcher/extension_app_window_launcher_controller.cc

Issue 2052013002: Adding ChromeLauncherController interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome_launcher_smaller_api
Patch Set: Rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d3d80af4098e70cf967eb808caea1a26930810fd 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);
}
@@ -138,8 +139,11 @@ void ExtensionAppWindowLauncherController::RegisterApp(AppWindow* app_window) {
controller->AddAppWindow(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)
- shelf_id = owner()->GetShelfIDForAppID(app_id);
+ if (app_shelf_id == 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.

Powered by Google App Engine
This is Rietveld 408576698