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

Side by Side Diff: chrome/browser/ui/website_settings/permission_bubble_view.h

Issue 167613002: Revert of [WebsiteSettings] Set view to null on manager to ensure no stale access. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months 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
« no previous file with comments | « chrome/browser/ui/website_settings/permission_bubble_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_BUBBLE_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 class PermissionBubbleRequest; 10 class PermissionBubbleRequest;
11 class PermissionBubbleManager; 11 class PermissionBubbleManager;
12 12
13 // This class is the platform-independent interface through which the permission 13 // This class is the platform-independent interface through which the permission
14 // bubble managers (which are one per tab) communicate to the UI surface. 14 // bubble managers (which are one per tab) communicate to the UI surface.
15 // When the visible tab changes, the UI code must provide an object of this type 15 // When the visible tab changes, the UI code must provide an object of this type
16 // to the manager for the visible tab. 16 // to the manager for the visible tab.
17 class PermissionBubbleView { 17 class PermissionBubbleView {
18 public: 18 public:
19 // The delegate will receive events caused by user action which need to 19 // The delegate will receive events caused by user action which need to
20 // be persisted in the per-tab UI state. 20 // be persisted in the per-tab UI state.
21 class Delegate { 21 class Delegate {
22 public: 22 public:
23 virtual void ToggleAccept(int index, bool new_value) = 0; 23 virtual void ToggleAccept(int index, bool new_value) = 0;
24 virtual void SetCustomizationMode() = 0; 24 virtual void SetCustomizationMode() = 0;
25 virtual void Accept() = 0; 25 virtual void Accept() = 0;
26 virtual void Deny() = 0; 26 virtual void Deny() = 0;
27 virtual void Closing() = 0; 27 virtual void Closing() = 0;
28 virtual void SetView(PermissionBubbleView* view) = 0;
29 }; 28 };
30 29
31 // Sets the delegate which will receive UI events forwarded from the bubble. 30 // Sets the delegate which will receive UI events forwarded from the bubble.
32 virtual void SetDelegate(Delegate* delegate) = 0; 31 virtual void SetDelegate(Delegate* delegate) = 0;
33 32
34 // Causes the bubble to show up with the given contents. 33 // Causes the bubble to show up with the given contents.
35 virtual void Show( 34 virtual void Show(
36 const std::vector<PermissionBubbleRequest*>& requests, 35 const std::vector<PermissionBubbleRequest*>& requests,
37 const std::vector<bool>& accept_state, 36 const std::vector<bool>& accept_state,
38 bool custommization_mode) = 0; 37 bool custommization_mode) = 0;
39 38
40 // Hides the permission bubble. 39 // Hides the permission bubble.
41 virtual void Hide() = 0; 40 virtual void Hide() = 0;
42 }; 41 };
43 42
44 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_ 43 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/permission_bubble_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698