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

Side by Side Diff: chrome/browser/ui/views/website_settings/permission_selector_view.h

Issue 11571010: fixed the DCHECK and also corrected the website setting UI for media (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Markus' comment and consolidated |web_content_|. Created 8 years 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
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 13 matching lines...) Expand all
24 namespace views { 24 namespace views {
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 PermissionMenuModel::Delegate { 32 public PermissionMenuModel::Delegate {
33 public: 33 public:
34 PermissionSelectorView(ContentSettingsType type, 34 PermissionSelectorView(const GURL& url,
35 ContentSettingsType type,
35 ContentSetting default_setting, 36 ContentSetting default_setting,
36 ContentSetting current_setting, 37 ContentSetting current_setting,
37 content_settings::SettingSource source); 38 content_settings::SettingSource source);
38 39
39 void AddObserver(PermissionSelectorViewObserver* observer); 40 void AddObserver(PermissionSelectorViewObserver* observer);
40 41
41 // Returns the selected setting. 42 // Returns the selected setting.
42 ContentSetting current_setting() const { return current_setting_; } 43 ContentSetting current_setting() const { return current_setting_; }
43 44
44 // Returns the permission type. 45 // Returns the permission type.
(...skipping 23 matching lines...) Expand all
68 69
69 // The currently active setting for the permission |type_|. 70 // The currently active setting for the permission |type_|.
70 ContentSetting current_setting_; 71 ContentSetting current_setting_;
71 72
72 ObserverList<PermissionSelectorViewObserver, false> observer_list_; 73 ObserverList<PermissionSelectorViewObserver, false> observer_list_;
73 74
74 DISALLOW_COPY_AND_ASSIGN(PermissionSelectorView); 75 DISALLOW_COPY_AND_ASSIGN(PermissionSelectorView);
75 }; 76 };
76 77
77 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ 78 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698