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_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 // The context menu model for extension icons. | 28 // The context menu model for extension icons. |
29 class ExtensionContextMenuModel | 29 class ExtensionContextMenuModel |
30 : public base::RefCounted<ExtensionContextMenuModel>, | 30 : public base::RefCounted<ExtensionContextMenuModel>, |
31 public ui::SimpleMenuModel, | 31 public ui::SimpleMenuModel, |
32 public ui::SimpleMenuModel::Delegate, | 32 public ui::SimpleMenuModel::Delegate, |
33 public extensions::ExtensionUninstallDialog::Delegate { | 33 public extensions::ExtensionUninstallDialog::Delegate { |
34 public: | 34 public: |
35 enum MenuEntries { | 35 enum MenuEntries { |
36 NAME = 0, | 36 NAME = 0, |
37 CONFIGURE, | 37 CONFIGURE, |
38 HIDE, | 38 TOGGLE_VISIBILITY, |
39 UNINSTALL, | 39 UNINSTALL, |
40 MANAGE, | 40 MANAGE, |
41 INSPECT_POPUP, | 41 INSPECT_POPUP, |
42 ALWAYS_RUN | 42 ALWAYS_RUN |
43 }; | 43 }; |
44 | 44 |
45 // Type of action the extension icon represents. | 45 // Type of action the extension icon represents. |
46 enum ActionType { NO_ACTION = 0, BROWSER_ACTION, PAGE_ACTION }; | 46 enum ActionType { NO_ACTION = 0, BROWSER_ACTION, PAGE_ACTION }; |
47 | 47 |
48 // Delegate to handle showing an ExtensionAction popup. | 48 // Delegate to handle showing an ExtensionAction popup. |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 // Menu matcher for context menu items specified by the extension. | 123 // Menu matcher for context menu items specified by the extension. |
124 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; | 124 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; |
125 | 125 |
126 // Number of extension items in this menu. Used for testing. | 126 // Number of extension items in this menu. Used for testing. |
127 int extension_items_count_; | 127 int extension_items_count_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); | 129 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); |
130 }; | 130 }; |
131 | 131 |
132 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 132 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
OLD | NEW |