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 ASH_SHELL_DELEGATE_H_ | 5 #ifndef ASH_SHELL_DELEGATE_H_ |
6 #define ASH_SHELL_DELEGATE_H_ | 6 #define ASH_SHELL_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/string16.h" | 14 #include "base/string16.h" |
15 | 15 |
16 namespace aura { | 16 namespace aura { |
17 class Window; | 17 class Window; |
18 } | 18 } |
19 | 19 |
20 namespace views { | 20 namespace views { |
21 class Widget; | 21 class Widget; |
22 } | 22 } |
23 | 23 |
24 namespace ash { | 24 namespace ash { |
25 | 25 |
26 class AppListModel; | |
27 class AppListViewDelegate; | 26 class AppListViewDelegate; |
28 class LauncherDelegate; | 27 class LauncherDelegate; |
29 class LauncherModel; | 28 class LauncherModel; |
30 struct LauncherItem; | 29 struct LauncherItem; |
31 class ScreenshotDelegate; | 30 class ScreenshotDelegate; |
32 class SystemTray; | 31 class SystemTray; |
33 class SystemTrayDelegate; | 32 class SystemTrayDelegate; |
34 | 33 |
35 // Delegate of the Shell. | 34 // Delegate of the Shell. |
36 class ASH_EXPORT ShellDelegate { | 35 class ASH_EXPORT ShellDelegate { |
(...skipping 19 matching lines...) Expand all Loading... |
56 virtual views::Widget* CreateStatusArea() = 0; | 55 virtual views::Widget* CreateStatusArea() = 0; |
57 | 56 |
58 #if defined(OS_CHROMEOS) | 57 #if defined(OS_CHROMEOS) |
59 // Invoked when a user uses Ctrl-Shift-L to lock the screen. | 58 // Invoked when a user uses Ctrl-Shift-L to lock the screen. |
60 virtual void LockScreen() = 0; | 59 virtual void LockScreen() = 0; |
61 #endif | 60 #endif |
62 | 61 |
63 // Invoked when a user uses Ctrl-Shift-Q to close chrome. | 62 // Invoked when a user uses Ctrl-Shift-Q to close chrome. |
64 virtual void Exit() = 0; | 63 virtual void Exit() = 0; |
65 | 64 |
66 // Invoked to ask the delegate to populate the |model|. | |
67 virtual void BuildAppListModel(AppListModel* model) = 0; | |
68 | |
69 // Invoked to create an AppListViewDelegate. Shell takes the ownership of | 65 // Invoked to create an AppListViewDelegate. Shell takes the ownership of |
70 // the created delegate. | 66 // the created delegate. |
71 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0; | 67 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0; |
72 | 68 |
73 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab | 69 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab |
74 // or the window switching key). If |order_by_activity| is true then windows | 70 // or the window switching key). If |order_by_activity| is true then windows |
75 // are returned in most-recently-used order with the currently active window | 71 // are returned in most-recently-used order with the currently active window |
76 // at the front of the list. Otherwise any order may be returned. The list | 72 // at the front of the list. Otherwise any order may be returned. The list |
77 // does not contain NULL pointers. | 73 // does not contain NULL pointers. |
78 virtual std::vector<aura::Window*> GetCycleWindowList( | 74 virtual std::vector<aura::Window*> GetCycleWindowList( |
(...skipping 14 matching lines...) Expand all Loading... |
93 | 89 |
94 // Returns true if the delegate wants to override the window mode. Used only | 90 // Returns true if the delegate wants to override the window mode. Used only |
95 // by testing. Returning false causes the shell to determine the default. | 91 // by testing. Returning false causes the shell to determine the default. |
96 // TODO(beng): This can probably be removed once we only have one window mode. | 92 // TODO(beng): This can probably be removed once we only have one window mode. |
97 virtual bool GetOverrideWindowMode(Shell::WindowMode* window_mode) = 0; | 93 virtual bool GetOverrideWindowMode(Shell::WindowMode* window_mode) = 0; |
98 }; | 94 }; |
99 | 95 |
100 } // namespace ash | 96 } // namespace ash |
101 | 97 |
102 #endif // ASH_SHELL_DELEGATE_H_ | 98 #endif // ASH_SHELL_DELEGATE_H_ |
OLD | NEW |