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_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class ImageView; | 25 class ImageView; |
26 class MenuRunner; | 26 class MenuRunner; |
27 } | 27 } |
28 | 28 |
29 // A custom view for selecting a permission setting for the given permission | 29 // A custom view for selecting a permission setting for the given permission |
30 // |type|. | 30 // |type|. |
31 class PermissionSelectorView : public views::View { | 31 class PermissionSelectorView : public views::View { |
32 public: | 32 public: |
33 PermissionSelectorView(ContentSettingsType type, | 33 PermissionSelectorView(ContentSettingsType type, |
34 ContentSetting default_setting, | 34 ContentSetting default_setting, |
35 ContentSetting current_setting); | 35 ContentSetting current_setting, |
| 36 content_settings::SettingSource source); |
36 | 37 |
37 void AddObserver(PermissionSelectorViewObserver* observer); | 38 void AddObserver(PermissionSelectorViewObserver* observer); |
38 | 39 |
39 // This method is called by the menu button model whenever the current setting | 40 // This method is called by the menu button model whenever the current setting |
40 // is changed. | 41 // is changed. |
41 void SelectionChanged(); | 42 void SelectionChanged(); |
42 | 43 |
43 // Returns the selected setting. | 44 // Returns the selected setting. |
44 ContentSetting GetSelectedSetting() const; | 45 ContentSetting GetSelectedSetting() const; |
45 | 46 |
(...skipping 10 matching lines...) Expand all Loading... |
56 views::ImageView* icon_; // Owned by the views hierachy. | 57 views::ImageView* icon_; // Owned by the views hierachy. |
57 internal::PermissionMenuButton* menu_button_; // Owned by the views hierachy. | 58 internal::PermissionMenuButton* menu_button_; // Owned by the views hierachy. |
58 scoped_ptr<internal::PermissionMenuModel> menu_button_model_; | 59 scoped_ptr<internal::PermissionMenuModel> menu_button_model_; |
59 | 60 |
60 ObserverList<PermissionSelectorViewObserver, false> observer_list_; | 61 ObserverList<PermissionSelectorViewObserver, false> observer_list_; |
61 | 62 |
62 DISALLOW_COPY_AND_ASSIGN(PermissionSelectorView); | 63 DISALLOW_COPY_AND_ASSIGN(PermissionSelectorView); |
63 }; | 64 }; |
64 | 65 |
65 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ | 66 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ |
OLD | NEW |