| 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 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class LauncherDelegate; | 27 class LauncherDelegate; |
| 28 class LauncherModel; | 28 class LauncherModel; |
| 29 struct LauncherItem; | 29 struct LauncherItem; |
| 30 class ScreenshotDelegate; | 30 class ScreenshotDelegate; |
| 31 class SystemTray; | 31 class SystemTray; |
| 32 class SystemTrayDelegate; | 32 class SystemTrayDelegate; |
| 33 | 33 |
| 34 // Delegate of the Shell. | 34 // Delegate of the Shell. |
| 35 class ASH_EXPORT ShellDelegate { | 35 class ASH_EXPORT ShellDelegate { |
| 36 public: | 36 public: |
| 37 enum CycleOrder { | |
| 38 ORDER_MRU, // Most recently used | |
| 39 ORDER_LINEAR | |
| 40 }; | |
| 41 | |
| 42 // Source requesting the window list. | 37 // Source requesting the window list. |
| 43 enum CycleSource { | 38 enum CycleSource { |
| 44 // Windows are going to be used for alt-tab (or F5). | 39 // Windows are going to be used for alt-tab (or F5). |
| 45 SOURCE_KEYBOARD, | 40 SOURCE_KEYBOARD, |
| 46 | 41 |
| 47 // Windows are going to be cycled from the launcher. | 42 // Windows are going to be cycled from the launcher. |
| 48 SOURCE_LAUNCHER, | 43 SOURCE_LAUNCHER, |
| 49 }; | 44 }; |
| 50 | 45 |
| 51 // The Shell owns the delegate. | 46 // The Shell owns the delegate. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 65 // Invoked to create an AppListViewDelegate. Shell takes the ownership of | 60 // Invoked to create an AppListViewDelegate. Shell takes the ownership of |
| 66 // the created delegate. | 61 // the created delegate. |
| 67 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0; | 62 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0; |
| 68 | 63 |
| 69 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab | 64 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab |
| 70 // or the window switching key). If |order_by_activity| is true then windows | 65 // or the window switching key). If |order_by_activity| is true then windows |
| 71 // are returned in most-recently-used order with the currently active window | 66 // are returned in most-recently-used order with the currently active window |
| 72 // at the front of the list. Otherwise any order may be returned. The list | 67 // at the front of the list. Otherwise any order may be returned. The list |
| 73 // does not contain NULL pointers. | 68 // does not contain NULL pointers. |
| 74 virtual std::vector<aura::Window*> GetCycleWindowList( | 69 virtual std::vector<aura::Window*> GetCycleWindowList( |
| 75 CycleSource source, | 70 CycleSource source) const = 0; |
| 76 CycleOrder order) const = 0; | |
| 77 | 71 |
| 78 // Invoked to start taking partial screenshot. | 72 // Invoked to start taking partial screenshot. |
| 79 virtual void StartPartialScreenshot( | 73 virtual void StartPartialScreenshot( |
| 80 ScreenshotDelegate* screenshot_delegate) = 0; | 74 ScreenshotDelegate* screenshot_delegate) = 0; |
| 81 | 75 |
| 82 // Creates a new LauncherDelegate. Shell takes ownership of the returned | 76 // Creates a new LauncherDelegate. Shell takes ownership of the returned |
| 83 // value. | 77 // value. |
| 84 virtual LauncherDelegate* CreateLauncherDelegate( | 78 virtual LauncherDelegate* CreateLauncherDelegate( |
| 85 ash::LauncherModel* model) = 0; | 79 ash::LauncherModel* model) = 0; |
| 86 | 80 |
| 87 // Creates a system-tray delegate. Shell takes ownership of the delegate. | 81 // Creates a system-tray delegate. Shell takes ownership of the delegate. |
| 88 virtual SystemTrayDelegate* CreateSystemTrayDelegate(SystemTray* tray) = 0; | 82 virtual SystemTrayDelegate* CreateSystemTrayDelegate(SystemTray* tray) = 0; |
| 89 | |
| 90 // Returns true if the delegate wants to override the window mode. Used only | |
| 91 // by testing. Returning false causes the shell to determine the default. | |
| 92 // TODO(beng): This can probably be removed once we only have one window mode. | |
| 93 virtual bool GetOverrideWindowMode(Shell::WindowMode* window_mode) = 0; | |
| 94 }; | 83 }; |
| 95 | 84 |
| 96 } // namespace ash | 85 } // namespace ash |
| 97 | 86 |
| 98 #endif // ASH_SHELL_DELEGATE_H_ | 87 #endif // ASH_SHELL_DELEGATE_H_ |
| OLD | NEW |