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

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item_v2app.h

Issue 2671923002: mash: Cleanup ash shelf application menu code. (Closed)
Patch Set: Fix tests; cleanup. Created 3 years, 10 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_V2APP_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_V2APP_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_V2APP_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_V2APP_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "ash/public/cpp/shelf_application_menu_item.h"
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "chrome/browser/ui/ash/launcher/chrome_launcher_app_menu_item.h"
12 12
13 class ChromeLauncherController; 13 class ChromeLauncherController;
14 14
15 // A menu item controller for a running V2 application. It gets created when an 15 // A shelf application menu item for a running V2 application.
16 // application list gets created. It's main purpose is to add the activation 16 class ChromeLauncherAppMenuItemV2App : public ash::ShelfApplicationMenuItem {
17 // method to the |ChromeLauncherAppMenuItem| class.
18 class ChromeLauncherAppMenuItemV2App : public ChromeLauncherAppMenuItem {
19 public: 17 public:
20 ChromeLauncherAppMenuItemV2App( 18 ChromeLauncherAppMenuItemV2App(const base::string16 title,
21 const base::string16 title, 19 const gfx::Image* icon,
22 const gfx::Image* icon, 20 const std::string& app_id,
23 const std::string& app_id, 21 ChromeLauncherController* launcher_controller,
24 ChromeLauncherController* launcher_controller, 22 int app_index);
25 int app_index,
26 bool has_leading_separator);
27 ~ChromeLauncherAppMenuItemV2App() override; 23 ~ChromeLauncherAppMenuItemV2App() override;
28 24
29 bool IsEnabled() const override; 25 // ash::ShelfApplicationMenuItem:
30 void Execute(int event_flags) override; 26 void Execute(int event_flags) override;
31 27
32 private: 28 private:
33 // The owning class which can be used to validate the controller. 29 // The owning class which can be used to validate the controller.
34 ChromeLauncherController* launcher_controller_; 30 ChromeLauncherController* launcher_controller_;
35 31
36 // The application ID. 32 // The application ID.
37 const std::string app_id_; 33 const std::string app_id_;
38 34
39 // The index for the given application. 35 // The index for the given application.
40 const int app_index_; 36 const int app_index_;
41 37
42 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemV2App); 38 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherAppMenuItemV2App);
43 }; 39 };
44 40
45 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_V2APP_H_ 41 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_APP_MENU_ITEM_V2APP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698