Chromium Code Reviews| 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_LAUNCHER_LAUNCHER_DELEGATE_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
| 6 #define ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "ash/launcher/launcher_types.h" | 10 #include "ash/launcher/launcher_types.h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 public: | 21 public: |
| 22 virtual ~LauncherDelegate() {} | 22 virtual ~LauncherDelegate() {} |
| 23 | 23 |
| 24 // Invoked when the user clicks on button in the launcher to create a new | 24 // Invoked when the user clicks on button in the launcher to create a new |
| 25 // tab. | 25 // tab. |
| 26 virtual void CreateNewTab() = 0; | 26 virtual void CreateNewTab() = 0; |
| 27 | 27 |
| 28 // Invoked when the user clicks on button in the launcher to create a new | 28 // Invoked when the user clicks on button in the launcher to create a new |
| 29 // window. | 29 // window. |
| 30 virtual void CreateNewWindow() = 0; | 30 virtual void CreateNewWindow() = 0; |
| 31 // Invoked when the user clicks on button in the launcher to create a new | |
| 32 // incognito window. | |
| 33 virtual void CreateNewIncognitoWindow() = 0; | |
|
sky
2012/04/23 14:15:27
Since this and IsLogginedInAsGuest is only needed
DaveMoore
2012/04/23 17:48:08
Done.
| |
| 31 | 34 |
| 32 // Invoked when the user clicks on a window entry in the launcher. | 35 // Invoked when the user clicks on a window entry in the launcher. |
| 33 virtual void ItemClicked(const LauncherItem& item) = 0; | 36 virtual void ItemClicked(const LauncherItem& item) = 0; |
| 34 | 37 |
| 35 // Returns the resource id of the image to show on the browser shortcut | 38 // Returns the resource id of the image to show on the browser shortcut |
| 36 // button. | 39 // button. |
| 37 virtual int GetBrowserShortcutResourceId() = 0; | 40 virtual int GetBrowserShortcutResourceId() = 0; |
| 38 | 41 |
| 39 // Returns the title to display for the specified launcher item. | 42 // Returns the title to display for the specified launcher item. |
| 40 virtual string16 GetTitle(const LauncherItem& item) = 0; | 43 virtual string16 GetTitle(const LauncherItem& item) = 0; |
| 41 | 44 |
| 42 // Returns the context menumodel for the specified item. Return NULL if there | 45 // Returns the context menumodel for the specified item. Return NULL if there |
| 43 // should be no context menu. The caller takes ownership of the returned | 46 // should be no context menu. The caller takes ownership of the returned |
| 44 // model. | 47 // model. |
| 45 virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item) = 0; | 48 virtual ui::MenuModel* CreateContextMenu(const LauncherItem& item) = 0; |
| 46 | 49 |
| 47 // Returns the context menumodel for the launcher. Return NULL if there should | 50 // Returns the context menumodel for the launcher. Return NULL if there should |
| 48 // be no context menu. The caller takes ownership of the returned model. | 51 // be no context menu. The caller takes ownership of the returned model. |
| 49 virtual ui::MenuModel* CreateContextMenuForLauncher() = 0; | 52 virtual ui::MenuModel* CreateContextMenuForLauncher() = 0; |
| 50 | 53 |
| 51 // Returns the id of the item associated with the specified window, or 0 if | 54 // Returns the id of the item associated with the specified window, or 0 if |
| 52 // there isn't one. | 55 // there isn't one. |
| 53 virtual ash::LauncherID GetIDByWindow(aura::Window* window) = 0; | 56 virtual ash::LauncherID GetIDByWindow(aura::Window* window) = 0; |
| 57 | |
| 58 // Returns true if the user is currently logged in as a guest. | |
| 59 virtual bool IsLoggedInAsGuest() = 0; | |
| 54 }; | 60 }; |
| 55 | 61 |
| 56 } // namespace ash | 62 } // namespace ash |
| 57 | 63 |
| 58 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ | 64 #endif // ASH_LAUNCHER_LAUNCHER_DELEGATE_H_ |
| OLD | NEW |