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_launcher_context_menu.h" | 5 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h" |
6 | 6 |
7 #include "ash/public/cpp/shelf_item.h" | 7 #include "ash/public/cpp/shelf_item.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_shelf_id.h" | 11 #include "chrome/browser/ui/ash/launcher/arc_app_shelf_id.h" |
12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 12 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
13 #include "chrome/grit/generated_resources.h" | 13 #include "chrome/grit/generated_resources.h" |
14 | 14 |
15 ArcLauncherContextMenu::ArcLauncherContextMenu( | 15 ArcLauncherContextMenu::ArcLauncherContextMenu( |
16 ChromeLauncherControllerImpl* controller, | 16 ChromeLauncherController* controller, |
17 const ash::ShelfItem* item, | 17 const ash::ShelfItem* item, |
18 ash::WmShelf* wm_shelf) | 18 ash::WmShelf* wm_shelf) |
19 : LauncherContextMenu(controller, item, wm_shelf) { | 19 : LauncherContextMenu(controller, item, wm_shelf) { |
20 Init(); | 20 Init(); |
21 } | 21 } |
22 | 22 |
23 ArcLauncherContextMenu::~ArcLauncherContextMenu() {} | 23 ArcLauncherContextMenu::~ArcLauncherContextMenu() {} |
24 | 24 |
25 void ArcLauncherContextMenu::Init() { | 25 void ArcLauncherContextMenu::Init() { |
26 const ArcAppListPrefs* arc_list_prefs = | 26 const ArcAppListPrefs* arc_list_prefs = |
(...skipping 23 matching lines...) Expand all Loading... |
50 AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE); | 50 AddItemWithStringId(MENU_CLOSE, IDS_LAUNCHER_CONTEXT_MENU_CLOSE); |
51 AddSeparator(ui::NORMAL_SEPARATOR); | 51 AddSeparator(ui::NORMAL_SEPARATOR); |
52 AddShelfOptionsMenu(); | 52 AddShelfOptionsMenu(); |
53 } | 53 } |
54 | 54 |
55 bool ArcLauncherContextMenu::IsCommandIdEnabled(int command_id) const { | 55 bool ArcLauncherContextMenu::IsCommandIdEnabled(int command_id) const { |
56 if (command_id == MENU_OPEN_NEW) | 56 if (command_id == MENU_OPEN_NEW) |
57 return true; | 57 return true; |
58 return LauncherContextMenu::IsCommandIdEnabled(command_id); | 58 return LauncherContextMenu::IsCommandIdEnabled(command_id); |
59 } | 59 } |
OLD | NEW |