| 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 "chrome/browser/ui/website_settings/website_settings_ui.h" | 8 #include "chrome/browser/ui/website_settings/website_settings_ui.h" |
| 9 #include "chrome/common/content_settings.h" | 9 #include "chrome/common/content_settings.h" |
| 10 #include "chrome/common/content_settings_types.h" | 10 #include "components/content_settings/core/common/content_settings_types.h" |
| 11 #include "ui/base/models/simple_menu_model.h" | 11 #include "ui/base/models/simple_menu_model.h" |
| 12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 class PermissionMenuModel : public ui::SimpleMenuModel, | 14 class PermissionMenuModel : public ui::SimpleMenuModel, |
| 15 public ui::SimpleMenuModel::Delegate { | 15 public ui::SimpleMenuModel::Delegate { |
| 16 public: | 16 public: |
| 17 typedef base::Callback<void(const WebsiteSettingsUI::PermissionInfo&)> | 17 typedef base::Callback<void(const WebsiteSettingsUI::PermissionInfo&)> |
| 18 ChangeCallback; | 18 ChangeCallback; |
| 19 | 19 |
| 20 // Create a new menu model for permission settings. | 20 // Create a new menu model for permission settings. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 42 // The permission info represented by the menu model. | 42 // The permission info represented by the menu model. |
| 43 WebsiteSettingsUI::PermissionInfo permission_; | 43 WebsiteSettingsUI::PermissionInfo permission_; |
| 44 | 44 |
| 45 // Callback to be called when the permission's setting is changed. | 45 // Callback to be called when the permission's setting is changed. |
| 46 ChangeCallback callback_; | 46 ChangeCallback callback_; |
| 47 | 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(PermissionMenuModel); | 48 DISALLOW_COPY_AND_ASSIGN(PermissionMenuModel); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ | 51 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_MENU_MODEL_H_ |
| OLD | NEW |