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

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

Issue 791033004: Control permission bubbles with Finch flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Default to false Created 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/permission_bubble_manager.cc » ('j') | 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_MANAGER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_
6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 12 matching lines...) Expand all
23 // 23 //
24 // A PermissionBubbleManager is associated with a particular WebContents. 24 // A PermissionBubbleManager is associated with a particular WebContents.
25 // Requests attached to a particular WebContents' PBM must outlive it. 25 // Requests attached to a particular WebContents' PBM must outlive it.
26 // 26 //
27 // The PermissionBubbleManager should be addressed on the UI thread. 27 // The PermissionBubbleManager should be addressed on the UI thread.
28 class PermissionBubbleManager 28 class PermissionBubbleManager
29 : public content::WebContentsObserver, 29 : public content::WebContentsObserver,
30 public content::WebContentsUserData<PermissionBubbleManager>, 30 public content::WebContentsUserData<PermissionBubbleManager>,
31 public PermissionBubbleView::Delegate { 31 public PermissionBubbleView::Delegate {
32 public: 32 public:
33 // Return the flag-driven enabled state of permissions bubbles. 33 // Return the enabled state of permissions bubbles.
34 // Controlled by a flag and FieldTrial.
34 static bool Enabled(); 35 static bool Enabled();
35 36
36 ~PermissionBubbleManager() override; 37 ~PermissionBubbleManager() override;
37 38
38 // Adds a new request to the permission bubble. Ownership of the request 39 // Adds a new request to the permission bubble. Ownership of the request
39 // remains with the caller. The caller must arrange for the request to 40 // remains with the caller. The caller must arrange for the request to
40 // outlive the PermissionBubbleManager. If a bubble is visible when this 41 // outlive the PermissionBubbleManager. If a bubble is visible when this
41 // call is made, the request will be queued up and shown after the current 42 // call is made, the request will be queued up and shown after the current
42 // bubble closes. A request with message text identical to an outstanding 43 // bubble closes. A request with message text identical to an outstanding
43 // request will receive a RequestFinished call immediately and not be added. 44 // request will receive a RequestFinished call immediately and not be added.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 GURL request_url_; 136 GURL request_url_;
136 bool request_url_has_loaded_; 137 bool request_url_has_loaded_;
137 138
138 std::vector<bool> accept_states_; 139 std::vector<bool> accept_states_;
139 bool customization_mode_; 140 bool customization_mode_;
140 141
141 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; 142 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_;
142 }; 143 };
143 144
144 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ 145 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/website_settings/permission_bubble_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698