OLD | NEW |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 void SetView(PermissionBubbleView* view) override; | 59 void SetView(PermissionBubbleView* view) override; |
60 | 60 |
61 // Controls whether incoming permission requests require user gestures. | 61 // Controls whether incoming permission requests require user gestures. |
62 // If |required| is false, requests will be displayed as soon as they come in. | 62 // If |required| is false, requests will be displayed as soon as they come in. |
63 // If |required| is true, requests will be silently queued until a request | 63 // If |required| is true, requests will be silently queued until a request |
64 // comes in with a user gesture. | 64 // comes in with a user gesture. |
65 void RequireUserGesture(bool required); | 65 void RequireUserGesture(bool required); |
66 | 66 |
67 private: | 67 private: |
68 friend class DownloadRequestLimiterTest; | 68 friend class DownloadRequestLimiterTest; |
| 69 friend class GeolocationBrowserTest; |
| 70 friend class GeolocationPermissionContextTests; |
| 71 friend class GeolocationPermissionContextParamTests; |
69 friend class PermissionBubbleManagerTest; | 72 friend class PermissionBubbleManagerTest; |
70 friend class PermissionContextBaseTests; | 73 friend class PermissionContextBaseTests; |
71 friend class content::WebContentsUserData<PermissionBubbleManager>; | 74 friend class content::WebContentsUserData<PermissionBubbleManager>; |
72 | 75 |
73 explicit PermissionBubbleManager(content::WebContents* web_contents); | 76 explicit PermissionBubbleManager(content::WebContents* web_contents); |
74 | 77 |
75 // WebContentsObserver: | 78 // WebContentsObserver: |
76 void DocumentOnLoadCompletedInMainFrame() override; | 79 void DocumentOnLoadCompletedInMainFrame() override; |
77 void DocumentLoadedInFrame( | 80 void DocumentLoadedInFrame( |
78 content::RenderFrameHost* render_frame_host) override; | 81 content::RenderFrameHost* render_frame_host) override; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // TODO(gbillock): if there are iframes in the page, we need to deal with it. | 137 // TODO(gbillock): if there are iframes in the page, we need to deal with it. |
135 GURL request_url_; | 138 GURL request_url_; |
136 bool request_url_has_loaded_; | 139 bool request_url_has_loaded_; |
137 | 140 |
138 std::vector<bool> accept_states_; | 141 std::vector<bool> accept_states_; |
139 | 142 |
140 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; | 143 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; |
141 }; | 144 }; |
142 | 145 |
143 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 146 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
OLD | NEW |