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 CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
| 7 | 7 |
| 8 #include "ash/launcher/launcher_alignment_menu.h" | 8 #include "ash/launcher/launcher_alignment_menu.h" |
| 9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" | |
| 11 #include "ui/base/models/simple_menu_model.h" | 12 #include "ui/base/models/simple_menu_model.h" |
| 12 | 13 |
| 13 class ChromeLauncherController; | 14 class ChromeLauncherController; |
| 14 | 15 |
| 16 namespace extensions { | |
| 17 class ContextMenuManager; | |
| 18 } | |
| 19 | |
| 15 // Context menu shown for a launcher item. | 20 // Context menu shown for a launcher item. |
| 16 class LauncherContextMenu : public ui::SimpleMenuModel, | 21 class LauncherContextMenu : public ui::SimpleMenuModel, |
| 17 public ui::SimpleMenuModel::Delegate { | 22 public ui::SimpleMenuModel::Delegate { |
| 18 public: | 23 public: |
| 19 // |item| is NULL if the context menu is for the launcher (the user right | 24 // |item| is NULL if the context menu is for the launcher (the user right |
| 20 // |clicked on an area with no icons). | 25 // |clicked on an area with no icons). |
| 21 LauncherContextMenu(ChromeLauncherController* controller, | 26 LauncherContextMenu(ChromeLauncherController* controller, |
| 22 const ash::LauncherItem* item); | 27 const ash::LauncherItem* item); |
| 23 virtual ~LauncherContextMenu(); | 28 virtual ~LauncherContextMenu(); |
| 24 | 29 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 51 // Does |item_| represent a valid item? See description of constructor for | 56 // Does |item_| represent a valid item? See description of constructor for |
| 52 // details on why it may not be valid. | 57 // details on why it may not be valid. |
| 53 bool is_valid_item() const { return item_.id != 0; } | 58 bool is_valid_item() const { return item_.id != 0; } |
| 54 | 59 |
| 55 ChromeLauncherController* controller_; | 60 ChromeLauncherController* controller_; |
| 56 | 61 |
| 57 ash::LauncherItem item_; | 62 ash::LauncherItem item_; |
| 58 | 63 |
| 59 ash::LauncherAlignmentMenu alignment_menu_; | 64 ash::LauncherAlignmentMenu alignment_menu_; |
| 60 | 65 |
| 66 scoped_ptr<extensions::ContextMenuManager> context_menu_manager_; | |
|
asargent_no_longer_on_chrome
2012/09/10 20:25:20
same naming nit here - might be better to have som
Marijn Kruisselbrink
2012/09/10 23:16:57
Done.
| |
| 67 | |
| 61 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); | 68 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); |
| 62 }; | 69 }; |
| 63 | 70 |
| 64 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 71 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
| OLD | NEW |