Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_launcher_context_menu.cc

Issue 1838263002: Arc app integration in shelf launcher context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor and comments&inlucdes cleanup Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h"
6
7 #include "ash/shelf/shelf_item_types.h"
8 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
9 #include "chrome/grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h"
11
12 ArcLauncherContextMenu::ArcLauncherContextMenu(
13 ChromeLauncherController* controller,
14 const ash::ShelfItem* item,
15 ash::Shelf* shelf)
16 : LauncherContextMenu(controller, item, shelf) {
17 Init();
18 }
19
20 ArcLauncherContextMenu::~ArcLauncherContextMenu() {}
21
22 void ArcLauncherContextMenu::Init() {
23 AddItem(MENU_OPEN_NEW,
khmel 2016/03/30 00:58:46 Please use AddItemWithStringId (and at other place
lgcheng 2016/03/30 02:06:25 Done.
24 l10n_util::GetStringUTF16(IDS_APP_CONTEXT_MENU_ACTIVATE_ARC));
25 AddSeparator(ui::NORMAL_SEPARATOR);
26 AddPinMenu();
27 if (controller()->IsOpen(item().id))
28 AddItem(MENU_CLOSE,
29 l10n_util::GetStringUTF16(IDS_LAUNCHER_CONTEXT_MENU_CLOSE));
30 AddSeparator(ui::NORMAL_SEPARATOR);
31 AddAutohideAlignmentWallpaperMenu();
32 }
33
34 bool ArcLauncherContextMenu::IsCommandIdEnabled(int command_id) const {
35 if (command_id == MENU_OPEN_NEW)
36 return true;
37 return LauncherContextMenu::IsCommandIdEnabled(command_id);
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698