OLD | NEW |
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_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 void SetActiveWindow(aura::Window* window); | 53 void SetActiveWindow(aura::Window* window); |
54 | 54 |
55 const std::string& app_launcher_id() const { return app_launcher_id_; } | 55 const std::string& app_launcher_id() const { return app_launcher_id_; } |
56 | 56 |
57 // LauncherItemController overrides: | 57 // LauncherItemController overrides: |
58 virtual bool IsOpen() const OVERRIDE; | 58 virtual bool IsOpen() const OVERRIDE; |
59 virtual bool IsVisible() const OVERRIDE; | 59 virtual bool IsVisible() const OVERRIDE; |
60 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE; | 60 virtual void Launch(ash::LaunchSource source, int event_flags) OVERRIDE; |
61 virtual bool Activate(ash::LaunchSource source) OVERRIDE; | 61 virtual bool Activate(ash::LaunchSource source) OVERRIDE; |
62 virtual void Close() OVERRIDE; | |
63 virtual ChromeLauncherAppMenuItems GetApplicationList( | 62 virtual ChromeLauncherAppMenuItems GetApplicationList( |
64 int event_flags) OVERRIDE; | 63 int event_flags) OVERRIDE; |
65 virtual bool ItemSelected(const ui::Event& eent) OVERRIDE; | 64 virtual bool ItemSelected(const ui::Event& eent) OVERRIDE; |
66 virtual base::string16 GetTitle() OVERRIDE; | 65 virtual base::string16 GetTitle() OVERRIDE; |
67 virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) OVERRIDE; | 66 virtual ui::MenuModel* CreateContextMenu(aura::Window* root_window) OVERRIDE; |
68 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE; | 67 virtual ash::ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE; |
69 virtual bool IsDraggable() OVERRIDE; | 68 virtual bool IsDraggable() OVERRIDE; |
70 virtual bool ShouldShowTooltip() OVERRIDE; | 69 virtual bool ShouldShowTooltip() OVERRIDE; |
| 70 virtual void Close() OVERRIDE; |
71 | 71 |
72 // aura::WindowObserver overrides: | 72 // aura::WindowObserver overrides: |
73 virtual void OnWindowPropertyChanged(aura::Window* window, | 73 virtual void OnWindowPropertyChanged(aura::Window* window, |
74 const void* key, | 74 const void* key, |
75 intptr_t old) OVERRIDE; | 75 intptr_t old) OVERRIDE; |
76 | 76 |
77 // Get the number of running applications/incarnations of this. | 77 // Get the number of running applications/incarnations of this. |
78 size_t shell_window_count() const { return shell_windows_.size(); } | 78 size_t shell_window_count() const { return shell_windows_.size(); } |
79 | 79 |
80 // Activates the window at position |index|. | 80 // Activates the window at position |index|. |
(...skipping 18 matching lines...) Expand all Loading... |
99 // AppLauncherItemController for each |app_launcher_id_|. | 99 // AppLauncherItemController for each |app_launcher_id_|. |
100 const std::string app_launcher_id_; | 100 const std::string app_launcher_id_; |
101 | 101 |
102 // Scoped list of observed windows (for removal on destruction) | 102 // Scoped list of observed windows (for removal on destruction) |
103 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; | 103 ScopedObserver<aura::Window, aura::WindowObserver> observed_windows_; |
104 | 104 |
105 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController); | 105 DISALLOW_COPY_AND_ASSIGN(ShellWindowLauncherItemController); |
106 }; | 106 }; |
107 | 107 |
108 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_
H_ | 108 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_SHELL_WINDOW_LAUNCHER_ITEM_CONTROLLER_
H_ |
OLD | NEW |