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

Side by Side Diff: chrome/browser/ui/website_settings/permission_menu_model.h

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. Created 4 years, 5 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_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/ui/website_settings/website_settings_ui.h" 9 #include "chrome/browser/ui/website_settings/website_settings_ui.h"
10 #include "components/content_settings/core/common/content_settings.h" 10 #include "components/content_settings/core/common/content_settings.h"
(...skipping 16 matching lines...) Expand all
27 // initial selected option. It must be either CONTENT_SETTING_ALLOW or 27 // initial selected option. It must be either CONTENT_SETTING_ALLOW or
28 // CONTENT_SETTING_BLOCK. 28 // CONTENT_SETTING_BLOCK.
29 PermissionMenuModel(const GURL& url, 29 PermissionMenuModel(const GURL& url,
30 ContentSetting setting, 30 ContentSetting setting,
31 const ChangeCallback& callback); 31 const ChangeCallback& callback);
32 ~PermissionMenuModel() override; 32 ~PermissionMenuModel() override;
33 33
34 // Overridden from ui::SimpleMenuModel::Delegate: 34 // Overridden from ui::SimpleMenuModel::Delegate:
35 bool IsCommandIdChecked(int command_id) const override; 35 bool IsCommandIdChecked(int command_id) const override;
36 bool IsCommandIdEnabled(int command_id) const override; 36 bool IsCommandIdEnabled(int command_id) const override;
37 bool GetAcceleratorForCommandId(int command_id,
38 ui::Accelerator* accelerator) const override;
39 void ExecuteCommand(int command_id, int event_flags) override; 37 void ExecuteCommand(int command_id, int event_flags) override;
40 38
41 private: 39 private:
42 // The permission info represented by the menu model. 40 // The permission info represented by the menu model.
43 WebsiteSettingsUI::PermissionInfo permission_; 41 WebsiteSettingsUI::PermissionInfo permission_;
44 42
45 // Callback to be called when the permission's setting is changed. 43 // Callback to be called when the permission's setting is changed.
46 ChangeCallback callback_; 44 ChangeCallback callback_;
47 45
48 DISALLOW_COPY_AND_ASSIGN(PermissionMenuModel); 46 DISALLOW_COPY_AND_ASSIGN(PermissionMenuModel);
49 }; 47 };
50 48
51 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ 49 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698