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

Side by Side Diff: chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.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_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 26 matching lines...) Expand all
37 const std::string& app_id, 37 const std::string& app_id,
38 const std::string& launch_id, 38 const std::string& launch_id,
39 ChromeLauncherController* controller); 39 ChromeLauncherController* controller);
40 40
41 std::vector<content::WebContents*> GetRunningApplications(); 41 std::vector<content::WebContents*> GetRunningApplications();
42 42
43 // LauncherItemController overrides: 43 // LauncherItemController overrides:
44 void Launch(ash::LaunchSource source, int event_flags) override; 44 void Launch(ash::LaunchSource source, int event_flags) override;
45 ash::ShelfItemDelegate::PerformedAction Activate( 45 ash::ShelfItemDelegate::PerformedAction Activate(
46 ash::LaunchSource source) override; 46 ash::LaunchSource source) override;
47 ChromeLauncherAppMenuItems GetApplicationList(int event_flags) override;
48 ash::ShelfItemDelegate::PerformedAction ItemSelected( 47 ash::ShelfItemDelegate::PerformedAction ItemSelected(
49 const ui::Event& event) override; 48 const ui::Event& event) override;
50 ui::SimpleMenuModel* CreateApplicationMenu(int event_flags) override; 49 ash::ShelfApplicationMenuItems GetAppMenuItems(int event_flags) override;
51 void Close() override; 50 void Close() override;
52 51
53 // Get the refocus url pattern, which can be used to identify this application 52 // Get the refocus url pattern, which can be used to identify this application
54 // from a URL link. 53 // from a URL link.
55 const GURL& refocus_url() const { return refocus_url_; } 54 const GURL& refocus_url() const { return refocus_url_; }
56 // Set the refocus url pattern. Used by unit tests. 55 // Set the refocus url pattern. Used by unit tests.
57 void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; } 56 void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; }
58 57
59 ChromeLauncherController* controller() { return chrome_launcher_controller_; } 58 ChromeLauncherController* controller() { return chrome_launcher_controller_; }
60 59
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 // Since V2 applications can be undetectable after launching, this timer is 96 // Since V2 applications can be undetectable after launching, this timer is
98 // keeping track of the last launch attempt. 97 // keeping track of the last launch attempt.
99 base::Time last_launch_attempt_; 98 base::Time last_launch_attempt_;
100 99
101 ChromeLauncherController* chrome_launcher_controller_; 100 ChromeLauncherController* chrome_launcher_controller_;
102 101
103 DISALLOW_COPY_AND_ASSIGN(AppShortcutLauncherItemController); 102 DISALLOW_COPY_AND_ASSIGN(AppShortcutLauncherItemController);
104 }; 103 };
105 104
106 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_ H_ 105 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698