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; | |
72 friend class PermissionBubbleManagerTest; | 69 friend class PermissionBubbleManagerTest; |
73 friend class PermissionContextBaseTests; | 70 friend class PermissionContextBaseTests; |
74 friend class content::WebContentsUserData<PermissionBubbleManager>; | 71 friend class content::WebContentsUserData<PermissionBubbleManager>; |
75 | 72 |
76 explicit PermissionBubbleManager(content::WebContents* web_contents); | 73 explicit PermissionBubbleManager(content::WebContents* web_contents); |
77 | 74 |
78 // WebContentsObserver: | 75 // WebContentsObserver: |
79 void DocumentOnLoadCompletedInMainFrame() override; | 76 void DocumentOnLoadCompletedInMainFrame() override; |
80 void DocumentLoadedInFrame( | 77 void DocumentLoadedInFrame( |
81 content::RenderFrameHost* render_frame_host) override; | 78 content::RenderFrameHost* render_frame_host) override; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // TODO(gbillock): if there are iframes in the page, we need to deal with it. | 134 // TODO(gbillock): if there are iframes in the page, we need to deal with it. |
138 GURL request_url_; | 135 GURL request_url_; |
139 bool request_url_has_loaded_; | 136 bool request_url_has_loaded_; |
140 | 137 |
141 std::vector<bool> accept_states_; | 138 std::vector<bool> accept_states_; |
142 | 139 |
143 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; | 140 base::WeakPtrFactory<PermissionBubbleManager> weak_factory_; |
144 }; | 141 }; |
145 | 142 |
146 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ | 143 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_PERMISSION_BUBBLE_MANAGER_H_ |
OLD | NEW |