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 29 matching lines...) Expand all Loading... | |
40 | 40 |
41 // Source requesting the window list. | 41 // Source requesting the window list. |
42 enum CycleSource { | 42 enum CycleSource { |
43 // Windows are going to be used for alt-tab (or F5). | 43 // Windows are going to be used for alt-tab (or F5). |
44 SOURCE_KEYBOARD, | 44 SOURCE_KEYBOARD, |
45 | 45 |
46 // Windows are going to be cycled from the launcher. | 46 // Windows are going to be cycled from the launcher. |
47 SOURCE_LAUNCHER, | 47 SOURCE_LAUNCHER, |
48 }; | 48 }; |
49 | 49 |
50 // Type of content to be shown when opening new tab. | |
51 enum NewTabContentType { | |
52 // Crosh should ber opened in the new tab. | |
53 NEW_TAB_CONTENT_CROSH | |
54 }; | |
55 | |
50 // The Shell owns the delegate. | 56 // The Shell owns the delegate. |
51 virtual ~ShellDelegate() {} | 57 virtual ~ShellDelegate() {} |
52 | 58 |
53 // Invoked to create a new status area. Can return NULL. | 59 // Invoked to create a new status area. Can return NULL. |
54 virtual views::Widget* CreateStatusArea() = 0; | 60 virtual views::Widget* CreateStatusArea() = 0; |
55 | 61 |
56 #if defined(OS_CHROMEOS) | 62 #if defined(OS_CHROMEOS) |
57 // Invoked when a user uses Ctrl-Shift-L to lock the screen. | 63 // Invoked when a user uses Ctrl-Shift-L to lock the screen. |
58 virtual void LockScreen() = 0; | 64 virtual void LockScreen() = 0; |
59 #endif | 65 #endif |
(...skipping 10 matching lines...) Expand all Loading... | |
70 | 76 |
71 // Returns a list of windows to cycle with keyboard shortcuts (e.g. alt-tab | 77 // 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 | 78 // 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 | 79 // 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 | 80 // at the front of the list. Otherwise any order may be returned. The list |
75 // does not contain NULL pointers. | 81 // does not contain NULL pointers. |
76 virtual std::vector<aura::Window*> GetCycleWindowList( | 82 virtual std::vector<aura::Window*> GetCycleWindowList( |
77 CycleSource source, | 83 CycleSource source, |
78 CycleOrder order) const = 0; | 84 CycleOrder order) const = 0; |
79 | 85 |
86 virtual void OpenNewTab(NewTabContentType type) = 0; | |
Ben Goodger (Google)
2012/01/30 19:06:16
This function should take a const GURL& instead of
| |
87 | |
80 // Launcher related methods -------------------------------------------------- | 88 // Launcher related methods -------------------------------------------------- |
81 | 89 |
82 // Invoked when the user clicks on button in the launcher to create a new | 90 // Invoked when the user clicks on button in the launcher to create a new |
83 // window. | 91 // window. |
84 virtual void CreateNewWindow() = 0; | 92 virtual void CreateNewWindow() = 0; |
85 | 93 |
86 // Invoked when the user clicks on a window entry in the launcher. | 94 // Invoked when the user clicks on a window entry in the launcher. |
87 virtual void LauncherItemClicked(const LauncherItem& item) = 0; | 95 virtual void LauncherItemClicked(const LauncherItem& item) = 0; |
88 | 96 |
89 // Returns the resource id of the image to show on the browser shortcut | 97 // Returns the resource id of the image to show on the browser shortcut |
90 // button. | 98 // button. |
91 virtual int GetBrowserShortcutResourceId() = 0; | 99 virtual int GetBrowserShortcutResourceId() = 0; |
92 | 100 |
93 // Returns the title to display for the specified launcher item. | 101 // Returns the title to display for the specified launcher item. |
94 virtual string16 GetLauncherItemTitle(const LauncherItem& item) = 0; | 102 virtual string16 GetLauncherItemTitle(const LauncherItem& item) = 0; |
95 }; | 103 }; |
96 | 104 |
97 } // namespace ash | 105 } // namespace ash |
98 | 106 |
99 #endif // ASH_SHELL_DELEGATE_H_ | 107 #endif // ASH_SHELL_DELEGATE_H_ |
OLD | NEW |