| 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 "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/string16.h" | 13 #include "base/string16.h" |
| 14 | 14 |
| 15 namespace aura { | 15 namespace aura { |
| 16 class Window; | 16 class Window; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace views { | 19 namespace views { |
| 20 class Widget; | 20 class Widget; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 | 24 |
| 25 class AppListModel; | |
| 26 class AppListViewDelegate; | 25 class AppListViewDelegate; |
| 27 class LauncherDelegate; | 26 class LauncherDelegate; |
| 28 class LauncherModel; | 27 class LauncherModel; |
| 29 struct LauncherItem; | 28 struct LauncherItem; |
| 30 class ScreenshotDelegate; | 29 class ScreenshotDelegate; |
| 31 class SystemTrayDelegate; | 30 class SystemTrayDelegate; |
| 32 | 31 |
| 33 // Delegate of the Shell. | 32 // Delegate of the Shell. |
| 34 class ASH_EXPORT ShellDelegate { | 33 class ASH_EXPORT ShellDelegate { |
| 35 public: | 34 public: |
| (...skipping 18 matching lines...) Expand all Loading... |
| 54 virtual views::Widget* CreateStatusArea() = 0; | 53 virtual views::Widget* CreateStatusArea() = 0; |
| 55 | 54 |
| 56 #if defined(OS_CHROMEOS) | 55 #if defined(OS_CHROMEOS) |
| 57 // Invoked when a user uses Ctrl-Shift-L to lock the screen. | 56 // Invoked when a user uses Ctrl-Shift-L to lock the screen. |
| 58 virtual void LockScreen() = 0; | 57 virtual void LockScreen() = 0; |
| 59 #endif | 58 #endif |
| 60 | 59 |
| 61 // Invoked when a user uses Ctrl-Shift-Q to close chrome. | 60 // Invoked when a user uses Ctrl-Shift-Q to close chrome. |
| 62 virtual void Exit() = 0; | 61 virtual void Exit() = 0; |
| 63 | 62 |
| 64 // Invoked to ask the delegate to populate the |model|. | |
| 65 virtual void BuildAppListModel(AppListModel* model) = 0; | |
| 66 | |
| 67 // Invoked to create an AppListViewDelegate. Shell takes the ownership of | 63 // Invoked to create an AppListViewDelegate. Shell takes the ownership of |
| 68 // the created delegate. | 64 // the created delegate. |
| 69 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0; | 65 virtual AppListViewDelegate* CreateAppListViewDelegate() = 0; |
| 70 | 66 |
| 71 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab | 67 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab |
| 72 // or the window switching key). If |order_by_activity| is true then windows | 68 // or the window switching key). If |order_by_activity| is true then windows |
| 73 // are returned in most-recently-used order with the currently active window | 69 // are returned in most-recently-used order with the currently active window |
| 74 // at the front of the list. Otherwise any order may be returned. The list | 70 // at the front of the list. Otherwise any order may be returned. The list |
| 75 // does not contain NULL pointers. | 71 // does not contain NULL pointers. |
| 76 virtual std::vector<aura::Window*> GetCycleWindowList( | 72 virtual std::vector<aura::Window*> GetCycleWindowList( |
| 77 CycleSource source, | 73 CycleSource source, |
| 78 CycleOrder order) const = 0; | 74 CycleOrder order) const = 0; |
| 79 | 75 |
| 80 // Invoked to start taking partial screenshot. | 76 // Invoked to start taking partial screenshot. |
| 81 virtual void StartPartialScreenshot( | 77 virtual void StartPartialScreenshot( |
| 82 ScreenshotDelegate* screenshot_delegate) = 0; | 78 ScreenshotDelegate* screenshot_delegate) = 0; |
| 83 | 79 |
| 84 // Creates a new LauncherDelegate. Shell takes ownership of the returned | 80 // Creates a new LauncherDelegate. Shell takes ownership of the returned |
| 85 // value. | 81 // value. |
| 86 virtual LauncherDelegate* CreateLauncherDelegate( | 82 virtual LauncherDelegate* CreateLauncherDelegate( |
| 87 ash::LauncherModel* model) = 0; | 83 ash::LauncherModel* model) = 0; |
| 88 | 84 |
| 89 // Creates a system-tray delegate. Shell takes ownership of the delegate. | 85 // Creates a system-tray delegate. Shell takes ownership of the delegate. |
| 90 virtual SystemTrayDelegate* CreateSystemTrayDelegate() = 0; | 86 virtual SystemTrayDelegate* CreateSystemTrayDelegate() = 0; |
| 91 }; | 87 }; |
| 92 | 88 |
| 93 } // namespace ash | 89 } // namespace ash |
| 94 | 90 |
| 95 #endif // ASH_SHELL_DELEGATE_H_ | 91 #endif // ASH_SHELL_DELEGATE_H_ |
| OLD | NEW |