| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_cont
roller.h" | 5 #include "chrome/browser/ui/ash/launcher/extension_app_window_launcher_item_cont
roller.h" |
| 6 | 6 |
| 7 #include "ash/common/wm/window_state.h" | 7 #include "ash/common/wm/window_state.h" |
| 8 #include "ash/wm/window_state_aura.h" | 8 #include "ash/wm/window_state_aura.h" |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" | 10 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 *app_window->app_icon().ToSkBitmap(), skia::ImageOperations::RESIZE_BEST, | 44 *app_window->app_icon().ToSkBitmap(), skia::ImageOperations::RESIZE_BEST, |
| 45 kAppListIconSize, kAppListIconSize); | 45 kAppListIconSize, kAppListIconSize); |
| 46 return gfx::Image(gfx::ImageSkia::CreateFrom1xBitmap(bmp)); | 46 return gfx::Image(gfx::ImageSkia::CreateFrom1xBitmap(bmp)); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace | 49 } // namespace |
| 50 | 50 |
| 51 ExtensionAppWindowLauncherItemController:: | 51 ExtensionAppWindowLauncherItemController:: |
| 52 ExtensionAppWindowLauncherItemController( | 52 ExtensionAppWindowLauncherItemController( |
| 53 Type type, | 53 Type type, |
| 54 const std::string& app_shelf_id, | |
| 55 const std::string& app_id, | 54 const std::string& app_id, |
| 55 const std::string& launch_id, |
| 56 ChromeLauncherController* controller) | 56 ChromeLauncherController* controller) |
| 57 : AppWindowLauncherItemController(type, app_shelf_id, app_id, controller) {} | 57 : AppWindowLauncherItemController(type, app_id, launch_id, controller) {} |
| 58 | 58 |
| 59 ExtensionAppWindowLauncherItemController:: | 59 ExtensionAppWindowLauncherItemController:: |
| 60 ~ExtensionAppWindowLauncherItemController() {} | 60 ~ExtensionAppWindowLauncherItemController() {} |
| 61 | 61 |
| 62 void ExtensionAppWindowLauncherItemController::AddAppWindow( | 62 void ExtensionAppWindowLauncherItemController::AddAppWindow( |
| 63 extensions::AppWindow* app_window) { | 63 extensions::AppWindow* app_window) { |
| 64 if (app_window->window_type_is_panel() && type() != TYPE_APP_PANEL) | 64 if (app_window->window_type_is_panel() && type() != TYPE_APP_PANEL) |
| 65 LOG(ERROR) << "AppWindow of type Panel added to non-panel launcher item"; | 65 LOG(ERROR) << "AppWindow of type Panel added to non-panel launcher item"; |
| 66 DCHECK(window_to_app_window_.find(app_window->GetBaseWindow()) == | 66 DCHECK(window_to_app_window_.find(app_window->GetBaseWindow()) == |
| 67 window_to_app_window_.end()); | 67 window_to_app_window_.end()); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 if (type() == TYPE_APP_PANEL) | 158 if (type() == TYPE_APP_PANEL) |
| 159 return true; | 159 return true; |
| 160 return AppWindowLauncherItemController::IsDraggable(); | 160 return AppWindowLauncherItemController::IsDraggable(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool ExtensionAppWindowLauncherItemController::ShouldShowTooltip() { | 163 bool ExtensionAppWindowLauncherItemController::ShouldShowTooltip() { |
| 164 if (type() == TYPE_APP_PANEL && IsVisible()) | 164 if (type() == TYPE_APP_PANEL && IsVisible()) |
| 165 return false; | 165 return false; |
| 166 return AppWindowLauncherItemController::ShouldShowTooltip(); | 166 return AppWindowLauncherItemController::ShouldShowTooltip(); |
| 167 } | 167 } |
| OLD | NEW |