Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: chrome/browser/extensions/extension_context_menu_model.h

Issue 419023002: Move ShowPopup logic from BrowserActionsContainer to BrowserActionView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 UNINSTALL, 33 UNINSTALL,
34 MANAGE, 34 MANAGE,
35 INSPECT_POPUP 35 INSPECT_POPUP
36 }; 36 };
37 37
38 // Delegate to handle showing an ExtensionAction popup. 38 // Delegate to handle showing an ExtensionAction popup.
39 class PopupDelegate { 39 class PopupDelegate {
40 public: 40 public:
41 // Called when the user selects the menu item which requests that the 41 // Called when the user selects the menu item which requests that the
42 // popup be shown and inspected. 42 // popup be shown and inspected.
43 virtual void InspectPopup(ExtensionAction* action) = 0; 43 // The delegate should know which popup to display.
44 virtual void InspectPopup() = 0;
44 45
45 protected: 46 protected:
46 virtual ~PopupDelegate() {} 47 virtual ~PopupDelegate() {}
47 }; 48 };
48 49
49 // Creates a menu model for the given extension. If 50 // Creates a menu model for the given extension. If
50 // prefs::kExtensionsUIDeveloperMode is enabled then a menu item 51 // prefs::kExtensionsUIDeveloperMode is enabled then a menu item
51 // will be shown for "Inspect Popup" which, when selected, will cause 52 // will be shown for "Inspect Popup" which, when selected, will cause
52 // ShowPopupForDevToolsWindow() to be called on |delegate|. 53 // ShowPopupForDevToolsWindow() to be called on |delegate|.
53 ExtensionContextMenuModel(const extensions::Extension* extension, 54 ExtensionContextMenuModel(const extensions::Extension* extension,
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // The delegate which handles the 'inspect popup' menu command (or NULL). 96 // The delegate which handles the 'inspect popup' menu command (or NULL).
96 PopupDelegate* delegate_; 97 PopupDelegate* delegate_;
97 98
98 // Keeps track of the extension uninstall dialog. 99 // Keeps track of the extension uninstall dialog.
99 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_; 100 scoped_ptr<extensions::ExtensionUninstallDialog> extension_uninstall_dialog_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); 102 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel);
102 }; 103 };
103 104
104 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ 105 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_context_menu_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698