Chromium Code Reviews| 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_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/page_info/website_settings_ui.h" |
| 10 #include "components/content_settings/core/common/content_settings.h" | 10 #include "components/content_settings/core/common/content_settings.h" |
| 11 #include "components/content_settings/core/common/content_settings_types.h" | 11 #include "components/content_settings/core/common/content_settings_types.h" |
| 12 #include "ui/base/models/simple_menu_model.h" | 12 #include "ui/base/models/simple_menu_model.h" |
| 13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
| 14 | 14 |
| 15 class HostContentSettingsMap; | 15 class HostContentSettingsMap; |
| 16 class Profile; | 16 class Profile; |
| 17 | 17 |
| 18 class PermissionMenuModel : public ui::SimpleMenuModel, | 18 class PermissionMenuModel : public ui::SimpleMenuModel, |
|
estark
2017/03/11 01:10:50
This class is used by both Page Info and permissio
lgarron
2017/03/11 01:35:40
Ooh, good catch. (I thought I had verified that th
| |
| 19 public ui::SimpleMenuModel::Delegate { | 19 public ui::SimpleMenuModel::Delegate { |
| 20 public: | 20 public: |
| 21 typedef base::Callback<void(const WebsiteSettingsUI::PermissionInfo&)> | 21 typedef base::Callback<void(const WebsiteSettingsUI::PermissionInfo&)> |
| 22 ChangeCallback; | 22 ChangeCallback; |
| 23 | 23 |
| 24 // Create a new menu model for permission settings. | 24 // Create a new menu model for permission settings. |
| 25 PermissionMenuModel(Profile* profile, | 25 PermissionMenuModel(Profile* profile, |
| 26 const GURL& url, | 26 const GURL& url, |
| 27 const WebsiteSettingsUI::PermissionInfo& info, | 27 const WebsiteSettingsUI::PermissionInfo& info, |
| 28 const ChangeCallback& callback); | 28 const ChangeCallback& callback); |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 47 // The permission info represented by the menu model. | 47 // The permission info represented by the menu model. |
| 48 WebsiteSettingsUI::PermissionInfo permission_; | 48 WebsiteSettingsUI::PermissionInfo permission_; |
| 49 | 49 |
| 50 // Callback to be called when the permission's setting is changed. | 50 // Callback to be called when the permission's setting is changed. |
| 51 ChangeCallback callback_; | 51 ChangeCallback callback_; |
| 52 | 52 |
| 53 DISALLOW_COPY_AND_ASSIGN(PermissionMenuModel); | 53 DISALLOW_COPY_AND_ASSIGN(PermissionMenuModel); |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ | 56 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ |
| OLD | NEW |