std::string GetAppShelfId(AppWindow* app_window) {
if (app_window->window_type_is_panel())
return base::StringPrintf("panel:%d", app_window->session_id().id());
- return app_window->extension()->id();
+ return app_window->extension_id();
}
bool ControlsWindow(aura::Window* window) {
registry_.insert(registry);
}
-void AppWindowLauncherController::OnAppWindowAdded(AppWindow* app_window) {
-#if !defined(OS_CHROMEOS)
- if (!ControlsWindow(app_window->GetNativeWindow()))
- return;
- RegisterApp(app_window);
-#endif
-}
-
void AppWindowLauncherController::OnAppWindowIconChanged(
AppWindow* app_window) {
if (!ControlsWindow(app_window->GetNativeWindow()))
app_window->app_icon().AsImageSkia());
}
-void AppWindowLauncherController::OnAppWindowRemoved(AppWindow* app_window) {
- // Do nothing here; app_window->window() has already been deleted and
- // OnWindowDestroying() has been called, doing the removal.
-}
-
-#if defined(OS_CHROMEOS)
void AppWindowLauncherController::OnAppWindowShown(AppWindow* app_window) {
aura::Window* window = app_window->GetNativeWindow();
if (!ControlsWindow(window))
if (IsRegisteredApp(window))
UnregisterApp(window);
}
-#endif
// Called from aura::Window::~Window(), before delegate_->OnWindowDestroyed()
// which destroys AppWindow, so both |window| and the associated AppWindow
window->AddObserver(this);
// Find or create an item controller and launcher item.
- std::string app_id = app_window->extension()->id();
+ std::string app_id = app_window->extension_id();
ash::ShelfItemStatus status = ash::wm::IsActiveWindow(window)
? ash::STATUS_ACTIVE
: ash::STATUS_RUNNING;