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

Side by Side Diff: chrome/browser/permissions/permission_queue_controller.h

Issue 2226633002: Add a feature to display a persistence toggle for permission prompts on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address nits, verbal change to make it geolocation-only Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PERMISSIONS_PERMISSION_QUEUE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_QUEUE_CONTROLLER_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_QUEUE_CONTROLLER_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_QUEUE_CONTROLLER_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/permissions/permission_util.h"
10 #include "components/content_settings/core/common/content_settings.h" 11 #include "components/content_settings/core/common/content_settings.h"
11 #include "components/content_settings/core/common/content_settings_types.h" 12 #include "components/content_settings/core/common/content_settings_types.h"
12 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
13 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
14 #include "content/public/browser/permission_type.h" 15 #include "content/public/browser/permission_type.h"
15 16
16 class GURL; 17 class GURL;
17 class PermissionRequestID; 18 class PermissionRequestID;
18 class InfoBarService; 19 class InfoBarService;
19 class Profile; 20 class Profile;
(...skipping 27 matching lines...) Expand all
47 void CancelInfoBarRequest(const PermissionRequestID& id); 48 void CancelInfoBarRequest(const PermissionRequestID& id);
48 49
49 // Called by the InfoBarDelegate to notify permission has been set. 50 // Called by the InfoBarDelegate to notify permission has been set.
50 // It'll notify and dismiss any other pending InfoBar request for the same 51 // It'll notify and dismiss any other pending InfoBar request for the same
51 // |requesting_frame| and embedder. 52 // |requesting_frame| and embedder.
52 void OnPermissionSet(const PermissionRequestID& id, 53 void OnPermissionSet(const PermissionRequestID& id,
53 const GURL& requesting_frame, 54 const GURL& requesting_frame,
54 const GURL& embedder, 55 const GURL& embedder,
55 bool user_gesture, 56 bool user_gesture,
56 bool update_content_setting, 57 bool update_content_setting,
57 bool allowed); 58 PermissionAction decision);
58 59
59 // Performs the update to content settings for a particular request frame 60 // Performs the update to content settings for a particular request frame
60 // context. 61 // context.
61 void UpdateContentSetting( 62 void UpdateContentSetting(const GURL& requesting_frame,
62 const GURL& requesting_frame, const GURL& embedder, bool allowed); 63 const GURL& embedder,
64 PermissionAction decision);
63 65
64 protected: 66 protected:
65 // content::NotificationObserver: 67 // content::NotificationObserver:
66 void Observe(int type, 68 void Observe(int type,
67 const content::NotificationSource& source, 69 const content::NotificationSource& source,
68 const content::NotificationDetails& details) override; 70 const content::NotificationDetails& details) override;
69 71
70 private: 72 private:
71 class PendingInfobarRequest; 73 class PendingInfobarRequest;
72 class RequestEquals; 74 class RequestEquals;
(...skipping 21 matching lines...) Expand all
94 Profile* const profile_; 96 Profile* const profile_;
95 content::PermissionType permission_type_; 97 content::PermissionType permission_type_;
96 ContentSettingsType content_settings_type_; 98 ContentSettingsType content_settings_type_;
97 PendingInfobarRequests pending_infobar_requests_; 99 PendingInfobarRequests pending_infobar_requests_;
98 bool in_shutdown_; 100 bool in_shutdown_;
99 101
100 DISALLOW_COPY_AND_ASSIGN(PermissionQueueController); 102 DISALLOW_COPY_AND_ASSIGN(PermissionQueueController);
101 }; 103 };
102 104
103 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_QUEUE_CONTROLLER_H_ 105 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_QUEUE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698