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

Side by Side Diff: chrome/browser/ui/panels/panel_settings_menu_model.h

Issue 9956145: Remove wrench button from panel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_SETTINGS_MENU_MODEL_H_
6 #define CHROME_BROWSER_UI_PANELS_PANEL_SETTINGS_MENU_MODEL_H_
7 #pragma once
8
9 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
10 #include "ui/base/models/simple_menu_model.h"
11
12 class Extension;
13 class Panel;
14
15 class PanelSettingsMenuModel : public ui::SimpleMenuModel,
16 public ui::SimpleMenuModel::Delegate,
17 public ExtensionUninstallDialog::Delegate {
18 public:
19 explicit PanelSettingsMenuModel(Panel* panel);
20 virtual ~PanelSettingsMenuModel();
21
22 private:
23 // Overridden from ui::SimpleMenuModel::Delegate:
24 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
25 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
26 virtual bool GetAcceleratorForCommandId(
27 int command_id, ui::Accelerator* accelerator) OVERRIDE;
28 virtual void ExecuteCommand(int command_id) OVERRIDE;
29
30 // ExtensionUninstallDialog::Delegate:
31 virtual void ExtensionUninstallAccepted() OVERRIDE;
32 virtual void ExtensionUninstallCanceled() OVERRIDE;
33
34 private:
35 friend class PanelBrowserTest;
36
37 enum {
38 COMMAND_NAME = 0,
39 COMMAND_CONFIGURE,
40 COMMAND_DISABLE,
41 COMMAND_UNINSTALL,
42 COMMAND_MANAGE
43 };
44
45 Panel* panel_;
46 scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
47
48 DISALLOW_COPY_AND_ASSIGN(PanelSettingsMenuModel);
49 };
50
51 #endif // CHROME_BROWSER_UI_PANELS_PANEL_SETTINGS_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698