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

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

Issue 1441143006: Disable Notifications in Incognito (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@innoinherit
Patch Set: Address nits Created 5 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
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 14 matching lines...) Expand all
25 namespace views { 25 namespace views {
26 class ImageView; 26 class ImageView;
27 class MenuRunner; 27 class MenuRunner;
28 } 28 }
29 29
30 // A custom view for selecting a permission setting for the given permission 30 // A custom view for selecting a permission setting for the given permission
31 // |type|. 31 // |type|.
32 class PermissionSelectorView : public views::View { 32 class PermissionSelectorView : public views::View {
33 public: 33 public:
34 PermissionSelectorView(const GURL& url, 34 PermissionSelectorView(const GURL& url,
35 const WebsiteSettingsUI::PermissionInfo& permission); 35 const WebsiteSettingsUI::PermissionInfo& permission,
36 bool is_incognito);
36 37
37 void AddObserver(PermissionSelectorViewObserver* observer); 38 void AddObserver(PermissionSelectorViewObserver* observer);
38 39
39 void PermissionChanged(const WebsiteSettingsUI::PermissionInfo& permission); 40 void PermissionChanged(const WebsiteSettingsUI::PermissionInfo& permission);
40 41
41 protected: 42 protected:
42 // Overridden from views::View. 43 // Overridden from views::View.
43 void ChildPreferredSizeChanged(View* child) override; 44 void ChildPreferredSizeChanged(View* child) override;
44 45
45 private: 46 private:
46 ~PermissionSelectorView() override; 47 ~PermissionSelectorView() override;
47 48
49 bool is_incognito_;
50
48 // Model for the permission's menu. 51 // Model for the permission's menu.
49 scoped_ptr<PermissionMenuModel> menu_model_; 52 scoped_ptr<PermissionMenuModel> menu_model_;
50 53
51 views::ImageView* icon_; // Owned by the views hierachy. 54 views::ImageView* icon_; // Owned by the views hierachy.
52 internal::PermissionMenuButton* menu_button_; // Owned by the views hierachy. 55 internal::PermissionMenuButton* menu_button_; // Owned by the views hierachy.
53 56
54 base::ObserverList<PermissionSelectorViewObserver, false> observer_list_; 57 base::ObserverList<PermissionSelectorViewObserver, false> observer_list_;
55 58
56 DISALLOW_COPY_AND_ASSIGN(PermissionSelectorView); 59 DISALLOW_COPY_AND_ASSIGN(PermissionSelectorView);
57 }; 60 };
58 61
59 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_ 62 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_SELECTOR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698