Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / ash / launcher / app_window_launcher_controller.cc
index 9fad25a..6dacb2e 100644 (file)
@@ -25,7 +25,7 @@ namespace {
 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) {
@@ -84,14 +84,6 @@ void AppWindowLauncherController::AdditionalUserAddedToSession(
   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()))
@@ -107,12 +99,6 @@ void AppWindowLauncherController::OnAppWindowIconChanged(
                                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))
@@ -130,7 +116,6 @@ void AppWindowLauncherController::OnAppWindowHidden(AppWindow* app_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
@@ -168,7 +153,7 @@ void AppWindowLauncherController::RegisterApp(AppWindow* app_window) {
   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;