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/common/shelf/shelf_item_types.h" | 7 #include "ash/shelf/shelf_item_types.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_impl.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 ChromeLauncherControllerImpl* controller, |
17 const ash::ShelfItem* item, | 17 const ash::ShelfItem* item, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |