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

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

Issue 666153002: Standardize usage of virtual/override/final in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ExtensionContextMenuModel(const extensions::Extension* extension, 64 ExtensionContextMenuModel(const extensions::Extension* extension,
65 Browser* browser, 65 Browser* browser,
66 PopupDelegate* delegate); 66 PopupDelegate* delegate);
67 67
68 // Create a menu model for the given extension, without support 68 // Create a menu model for the given extension, without support
69 // for the "Inspect Popup" command. 69 // for the "Inspect Popup" command.
70 ExtensionContextMenuModel(const extensions::Extension* extension, 70 ExtensionContextMenuModel(const extensions::Extension* extension,
71 Browser* browser); 71 Browser* browser);
72 72
73 // SimpleMenuModel::Delegate overrides. 73 // SimpleMenuModel::Delegate overrides.
74 virtual bool IsCommandIdChecked(int command_id) const override; 74 bool IsCommandIdChecked(int command_id) const override;
75 virtual bool IsCommandIdEnabled(int command_id) const override; 75 bool IsCommandIdEnabled(int command_id) const override;
76 virtual bool GetAcceleratorForCommandId( 76 bool GetAcceleratorForCommandId(int command_id,
77 int command_id, 77 ui::Accelerator* accelerator) override;
78 ui::Accelerator* accelerator) override; 78 void ExecuteCommand(int command_id, int event_flags) override;
79 virtual void ExecuteCommand(int command_id, int event_flags) override;
80 79
81 // ExtensionUninstallDialog::Delegate: 80 // ExtensionUninstallDialog::Delegate:
82 virtual void ExtensionUninstallAccepted() override; 81 void ExtensionUninstallAccepted() override;
83 virtual void ExtensionUninstallCanceled() override; 82 void ExtensionUninstallCanceled() override;
84 83
85 private: 84 private:
86 friend class base::RefCounted<ExtensionContextMenuModel>; 85 friend class base::RefCounted<ExtensionContextMenuModel>;
87 friend class extensions::ExtensionContextMenuModelTest; 86 friend class extensions::ExtensionContextMenuModelTest;
88 87
89 virtual ~ExtensionContextMenuModel(); 88 ~ExtensionContextMenuModel() override;
90 89
91 void InitMenu(const extensions::Extension* extension); 90 void InitMenu(const extensions::Extension* extension);
92 91
93 // Gets the extension we are displaying the menu for. Returns NULL if the 92 // Gets the extension we are displaying the menu for. Returns NULL if the
94 // extension has been uninstalled and no longer exists. 93 // extension has been uninstalled and no longer exists.
95 const extensions::Extension* GetExtension() const; 94 const extensions::Extension* GetExtension() const;
96 95
97 // Returns the active web contents. 96 // Returns the active web contents.
98 content::WebContents* GetActiveWebContents() const; 97 content::WebContents* GetActiveWebContents() const;
99 98
(...skipping 23 matching lines...) Expand all
123 // Menu matcher for context menu items specified by the extension. 122 // Menu matcher for context menu items specified by the extension.
124 scoped_ptr<extensions::ContextMenuMatcher> extension_items_; 123 scoped_ptr<extensions::ContextMenuMatcher> extension_items_;
125 124
126 // Number of extension items in this menu. Used for testing. 125 // Number of extension items in this menu. Used for testing.
127 int extension_items_count_; 126 int extension_items_count_;
128 127
129 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel); 128 DISALLOW_COPY_AND_ASSIGN(ExtensionContextMenuModel);
130 }; 129 };
131 130
132 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_ 131 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_CONTEXT_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698