| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_launcher_controller_impl.h" | 5 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 40 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
| 41 #include "chrome/browser/ui/ash/app_sync_ui_state.h" | 41 #include "chrome/browser/ui/ash/app_sync_ui_state.h" |
| 42 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 42 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 43 #include "chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
" | 43 #include "chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.h
" |
| 44 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" | 44 #include "chrome/browser/ui/ash/launcher/app_window_launcher_controller.h" |
| 45 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" | 45 #include "chrome/browser/ui/ash/launcher/app_window_launcher_item_controller.h" |
| 46 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" | 46 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" |
| 47 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" | 47 #include "chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.h" |
| 48 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll
er.h" | 48 #include "chrome/browser/ui/ash/launcher/browser_shortcut_launcher_item_controll
er.h" |
| 49 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h" | 49 #include "chrome/browser/ui/ash/launcher/browser_status_monitor.h" |
| 50 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h" | |
| 51 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
" | 50 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_browser.h
" |
| 52 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h" | 51 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_tab.h" |
| 53 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" | 52 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_util.h" |
| 54 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h" | 53 #include "chrome/browser/ui/ash/launcher/chrome_launcher_types.h" |
| 55 #include "chrome/browser/ui/ash/launcher/launcher_arc_app_updater.h" | 54 #include "chrome/browser/ui/ash/launcher/launcher_arc_app_updater.h" |
| 56 #include "chrome/browser/ui/ash/launcher/launcher_controller_helper.h" | 55 #include "chrome/browser/ui/ash/launcher/launcher_controller_helper.h" |
| 57 #include "chrome/browser/ui/ash/launcher/launcher_extension_app_updater.h" | 56 #include "chrome/browser/ui/ash/launcher/launcher_extension_app_updater.h" |
| 58 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" | 57 #include "chrome/browser/ui/ash/launcher/launcher_item_controller.h" |
| 59 #include "chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_contr
oller.h" | 58 #include "chrome/browser/ui/ash/launcher/multi_profile_app_window_launcher_contr
oller.h" |
| 60 #include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h" | 59 #include "chrome/browser/ui/ash/launcher/multi_profile_browser_status_monitor.h" |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 ash::Shell::GetInstance()->CreateKeyboard(); | 608 ash::Shell::GetInstance()->CreateKeyboard(); |
| 610 } | 609 } |
| 611 | 610 |
| 612 void ChromeLauncherControllerImpl::AdditionalUserAddedToSession( | 611 void ChromeLauncherControllerImpl::AdditionalUserAddedToSession( |
| 613 Profile* profile) { | 612 Profile* profile) { |
| 614 // Switch the running applications to the new user. | 613 // Switch the running applications to the new user. |
| 615 for (auto& controller : app_window_controllers_) | 614 for (auto& controller : app_window_controllers_) |
| 616 controller->AdditionalUserAddedToSession(profile); | 615 controller->AdditionalUserAddedToSession(profile); |
| 617 } | 616 } |
| 618 | 617 |
| 619 ChromeLauncherAppMenuItems ChromeLauncherControllerImpl::GetApplicationList( | 618 ash::ShelfAppMenuItemList ChromeLauncherControllerImpl::GetAppMenuItems( |
| 620 const ash::ShelfItem& item, | 619 const ash::ShelfItem& item, |
| 621 int event_flags) { | 620 int event_flags) { |
| 622 LauncherItemController* controller = GetLauncherItemController(item.id); | 621 LauncherItemController* controller = GetLauncherItemController(item.id); |
| 623 return controller ? controller->GetApplicationList(event_flags) | 622 return controller ? controller->GetAppMenuItems(event_flags) |
| 624 : ChromeLauncherAppMenuItems(); | 623 : ash::ShelfAppMenuItemList(); |
| 625 } | 624 } |
| 626 | 625 |
| 627 std::vector<content::WebContents*> | 626 std::vector<content::WebContents*> |
| 628 ChromeLauncherControllerImpl::GetV1ApplicationsFromAppId( | 627 ChromeLauncherControllerImpl::GetV1ApplicationsFromAppId( |
| 629 const std::string& app_id) { | 628 const std::string& app_id) { |
| 630 const ash::ShelfItem* item = GetItem(GetShelfIDForAppID(app_id)); | 629 const ash::ShelfItem* item = GetItem(GetShelfIDForAppID(app_id)); |
| 631 // If there is no such item pinned to the launcher, no menu gets created. | 630 // If there is no such item pinned to the launcher, no menu gets created. |
| 632 if (!item || item->type != ash::TYPE_APP_SHORTCUT) | 631 if (!item || item->type != ash::TYPE_APP_SHORTCUT) |
| 633 return std::vector<content::WebContents*>(); | 632 return std::vector<content::WebContents*>(); |
| 634 LauncherItemController* controller = GetLauncherItemController(item->id); | 633 LauncherItemController* controller = GetLauncherItemController(item->id); |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 LauncherItemController* controller = GetLauncherItemController(item.id); | 1490 LauncherItemController* controller = GetLauncherItemController(item.id); |
| 1492 if (!controller || controller->image_set_by_controller()) | 1491 if (!controller || controller->image_set_by_controller()) |
| 1493 continue; | 1492 continue; |
| 1494 item.image = image; | 1493 item.image = image; |
| 1495 if (arc_deferred_launcher_) | 1494 if (arc_deferred_launcher_) |
| 1496 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); | 1495 arc_deferred_launcher_->MaybeApplySpinningEffect(id, &item.image); |
| 1497 model_->Set(index, item); | 1496 model_->Set(index, item); |
| 1498 // It's possible we're waiting on more than one item, so don't break. | 1497 // It's possible we're waiting on more than one item, so don't break. |
| 1499 } | 1498 } |
| 1500 } | 1499 } |
| OLD | NEW |