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" |
| 11 #include "chrome/browser/extensions/context_menu_matcher.h" |
11 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 12 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
| 13 #include "chrome/browser/extensions/menu_manager.h" |
12 #include "ui/base/models/simple_menu_model.h" | 14 #include "ui/base/models/simple_menu_model.h" |
13 | 15 |
14 class Browser; | 16 class Browser; |
15 class ExtensionAction; | 17 class ExtensionAction; |
16 class Profile; | 18 class Profile; |
17 | 19 |
18 namespace extensions { | 20 namespace extensions { |
19 class Extension; | 21 class Extension; |
20 } | 22 } |
21 | 23 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 Browser* browser_; | 93 Browser* browser_; |
92 | 94 |
93 Profile* profile_; | 95 Profile* profile_; |
94 | 96 |
95 // The delegate which handles the 'inspect popup' menu command (or NULL). | 97 // The delegate which handles the 'inspect popup' menu command (or NULL). |
96 PopupDelegate* delegate_; | 98 PopupDelegate* delegate_; |
97 | 99 |
98 // Keeps track of the extension uninstall dialog. | 100 // Keeps track of the extension uninstall dialog. |
99 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; | 101 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; |
100 | 102 |
| 103 extensions::ContextMenuMatcher extension_items_; |
| 104 |
| 105 void AppendExtensionItems(); |
| 106 |
| 107 static bool MenuItemMatchesParams(const extensions::MenuItem* item); |
| 108 |
| 109 base::string16 PrintableSelectionText(); |
| 110 |
| 111 void EscapeAmpersands(base::string16* text); |
| 112 |
101 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); | 113 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); |
102 }; | 114 }; |
103 | 115 |
104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ | 116 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ |
OLD | NEW |