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

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

Issue 107163005: [ash] Add TYPE_DIALOG and its item's LauncherContextMenu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 11 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 | Annotate | Revision Log
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 9
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 22 matching lines...) Expand all
33 33
34 virtual ~AppShortcutLauncherItemController(); 34 virtual ~AppShortcutLauncherItemController();
35 35
36 std::vector<content::WebContents*> GetRunningApplications(); 36 std::vector<content::WebContents*> GetRunningApplications();
37 37
38 // LauncherItemController overrides: 38 // LauncherItemController overrides:
39 virtual bool IsOpen() const OVERRIDE; 39 virtual bool IsOpen() const OVERRIDE;
40 virtual bool IsVisible() const OVERRIDE; 40 virtual bool IsVisible() const OVERRIDE;
41 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE; 41 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE;
42 virtual bool Activate(ash::LaunchSource source) OVERRIDE; 42 virtual bool Activate(ash::LaunchSource source) OVERRIDE;
43 virtual void Close() OVERRIDE;
44 virtual ChromeLauncherAppMenuItems GetApplicationList( 43 virtual ChromeLauncherAppMenuItems GetApplicationList(
45 int event_flags) OVERRIDE; 44 int event_flags) OVERRIDE;
46 virtual bool ItemSelected(const ui::Event& event) OVERRIDE; 45 virtual bool ItemSelected(const ui::Event& event) OVERRIDE;
47 virtual base::string16 GetTitle() OVERRIDE; 46 virtual base::string16 GetTitle() OVERRIDE;
48 virtual ui::MenuModel* CreateContextMenu( 47 virtual ui::MenuModel* CreateContextMenu(
49 aura::Window* root_window) OVERRIDE; 48 aura::Window* root_window) OVERRIDE;
50 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE; 49 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE;
51 virtual bool IsDraggable() OVERRIDE; 50 virtual bool IsDraggable() OVERRIDE;
52 virtual bool ShouldShowTooltip() OVERRIDE; 51 virtual bool ShouldShowTooltip() OVERRIDE;
52 virtual void Close() OVERRIDE;
53 53
54 // Get the refocus url pattern, which can be used to identify this application 54 // Get the refocus url pattern, which can be used to identify this application
55 // from a URL link. 55 // from a URL link.
56 const GURL& refocus_url() const { return refocus_url_; } 56 const GURL& refocus_url() const { return refocus_url_; }
57 // Set the refocus url pattern. Used by unit tests. 57 // Set the refocus url pattern. Used by unit tests.
58 void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; } 58 void set_refocus_url(const GURL& refocus_url) { refocus_url_ = refocus_url; }
59 59
60 private: 60 private:
61 // Get the last running application. 61 // Get the last running application.
62 content::WebContents* GetLRUApplication(); 62 content::WebContents* GetLRUApplication();
(...skipping 26 matching lines...) Expand all
89 // Since V2 applications can be undetectable after launching, this timer is 89 // Since V2 applications can be undetectable after launching, this timer is
90 // keeping track of the last launch attempt. 90 // keeping track of the last launch attempt.
91 base::Time last_launch_attempt_; 91 base::Time last_launch_attempt_;
92 92
93 ChromeLauncherController* chrome_launcher_controller_; 93 ChromeLauncherController* chrome_launcher_controller_;
94 94
95 DISALLOW_COPY_AND_ASSIGN(AppShortcutLauncherItemController); 95 DISALLOW_COPY_AND_ASSIGN(AppShortcutLauncherItemController);
96 }; 96 };
97 97
98 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_ H_ 98 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_APP_SHORTCUT_LAUNCHER_ITEM_CONTROLLER_ H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698