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

Side by Side Diff: chrome/browser/ui/app_list/playstore_app_context_menu.cc

Issue 2929273002: Add the Play Store app search to the launcher. (Closed)
Patch Set: Finished comments and merged with the context menu CL. Created 3 years, 6 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 2017 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/app_list/playstore_app_context_menu.h"
6
7 #include "chrome/browser/ui/app_list/app_context_menu_delegate.h"
8 #include "chrome/grit/generated_resources.h"
9
10 PlayStoreAppContextMenu::PlayStoreAppContextMenu(
11 app_list::AppContextMenuDelegate* delegate,
12 Profile* profile,
13 AppListControllerDelegate* controller)
14 : app_list::AppContextMenu(delegate, profile, std::string(), controller) {}
15
16 PlayStoreAppContextMenu::~PlayStoreAppContextMenu() {}
Luis Héctor Chávez 2017/06/22 15:42:09 nit: = default;
Jiaquan He 2017/06/22 19:12:40 Done.
17
18 void PlayStoreAppContextMenu::BuildMenu(ui::SimpleMenuModel* menu_model) {
19 // App Info item.
20 menu_model->AddItemWithStringId(INSTALL, IDS_APP_CONTEXT_MENU_INSTALL);
21 }
22
23 bool PlayStoreAppContextMenu::IsCommandIdEnabled(int command_id) const {
24 switch (command_id) {
25 case INSTALL:
26 return true;
27 default:
28 return app_list::AppContextMenu::IsCommandIdEnabled(command_id);
29 }
30 return false;
Luis Héctor Chávez 2017/06/22 15:42:09 unneeded
Jiaquan He 2017/06/22 19:12:40 Done.
31 }
32
33 void PlayStoreAppContextMenu::ExecuteCommand(int command_id, int event_flags) {
34 switch (command_id) {
35 case INSTALL:
36 delegate()->ExecuteLaunchCommand(event_flags);
37 break;
38 default:
39 app_list::AppContextMenu::ExecuteCommand(command_id, event_flags);
40 }
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698