| 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/arc_app_window_launcher_item_controller
.h" | 5 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_item_controller
.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 9 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
| 10 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 10 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
| 11 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" | 11 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" |
| 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h" | 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h" |
| 13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" | 13 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 14 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h" | 14 #include "chrome/browser/ui/ash/launcher/launcher_application_menu_item_model.h" |
| 15 #include "ui/aura/window.h" | 15 #include "ui/aura/window.h" |
| 16 #include "ui/base/base_window.h" | 16 #include "ui/base/base_window.h" |
| 17 | 17 |
| 18 ArcAppWindowLauncherItemController::ArcAppWindowLauncherItemController( | 18 ArcAppWindowLauncherItemController::ArcAppWindowLauncherItemController( |
| 19 const std::string& arc_app_id, | 19 const std::string& arc_app_id, |
| 20 ChromeLauncherController* controller) | 20 ChromeLauncherController* controller) |
| 21 : AppWindowLauncherItemController(TYPE_APP, | 21 : AppWindowLauncherItemController(TYPE_APP, arc_app_id, "", controller) {} |
| 22 arc_app_id, | |
| 23 arc_app_id, | |
| 24 controller) {} | |
| 25 | 22 |
| 26 ArcAppWindowLauncherItemController::~ArcAppWindowLauncherItemController() {} | 23 ArcAppWindowLauncherItemController::~ArcAppWindowLauncherItemController() {} |
| 27 | 24 |
| 28 void ArcAppWindowLauncherItemController::AddTaskId(int task_id) { | 25 void ArcAppWindowLauncherItemController::AddTaskId(int task_id) { |
| 29 task_ids_.insert(task_id); | 26 task_ids_.insert(task_id); |
| 30 } | 27 } |
| 31 | 28 |
| 32 void ArcAppWindowLauncherItemController::RemoveTaskId(int task_id) { | 29 void ArcAppWindowLauncherItemController::RemoveTaskId(int task_id) { |
| 33 task_ids_.erase(task_id); | 30 task_ids_.erase(task_id); |
| 34 } | 31 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 size_t i = std::distance(windows().begin(), it); | 72 size_t i = std::distance(windows().begin(), it); |
| 76 gfx::Image image; | 73 gfx::Image image; |
| 77 aura::Window* window = (*it)->GetNativeWindow(); | 74 aura::Window* window = (*it)->GetNativeWindow(); |
| 78 items.push_back(new ChromeLauncherAppMenuItemV2App( | 75 items.push_back(new ChromeLauncherAppMenuItemV2App( |
| 79 ((window && !window->title().empty()) ? window->title() : GetTitle()), | 76 ((window && !window->title().empty()) ? window->title() : GetTitle()), |
| 80 &image, app_id(), launcher_controller(), i, | 77 &image, app_id(), launcher_controller(), i, |
| 81 i == 0 /* has_leading_separator */)); | 78 i == 0 /* has_leading_separator */)); |
| 82 } | 79 } |
| 83 return items; | 80 return items; |
| 84 } | 81 } |
| OLD | NEW |