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

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

Issue 2975593002: [vr] Deny permission requests in VR mode
Patch Set: . Created 3 years, 5 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 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_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 5 #ifndef CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 6 #define CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <unordered_map> 9 #include <unordered_map>
10 10
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void RemoveObserver(Observer* observer); 103 void RemoveObserver(Observer* observer);
104 104
105 // Do NOT use this methods in production code. Use this methods in browser 105 // Do NOT use this methods in production code. Use this methods in browser
106 // tests that need to accept or deny permissions when requested in 106 // tests that need to accept or deny permissions when requested in
107 // JavaScript. Your test needs to set this appropriately, and then the bubble 107 // JavaScript. Your test needs to set this appropriately, and then the bubble
108 // will proceed as desired as soon as Show() is called. 108 // will proceed as desired as soon as Show() is called.
109 void set_auto_response_for_test(AutoResponseType response) { 109 void set_auto_response_for_test(AutoResponseType response) {
110 auto_response_for_test_ = response; 110 auto_response_for_test_ = response;
111 } 111 }
112 112
113 virtual bool PermissionRequestsDisabled() const;
114
113 private: 115 private:
114 friend class test::PermissionRequestManagerTestApi; 116 friend class test::PermissionRequestManagerTestApi;
115 117
116 // TODO(felt): Update testing to use the TestApi so that it doesn't involve a 118 // TODO(felt): Update testing to use the TestApi so that it doesn't involve a
117 // lot of friends. 119 // lot of friends.
118 friend class GeolocationBrowserTest; 120 friend class GeolocationBrowserTest;
119 friend class GeolocationPermissionContextTests; 121 friend class GeolocationPermissionContextTests;
120 friend class MockPermissionPrompt; 122 friend class MockPermissionPrompt;
121 friend class MockPermissionPromptFactory; 123 friend class MockPermissionPromptFactory;
122 friend class PermissionContextBaseTests; 124 friend class PermissionContextBaseTests;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // Whether the response to each request should be persisted. 199 // Whether the response to each request should be persisted.
198 bool persist_; 200 bool persist_;
199 201
200 base::ObserverList<Observer> observer_list_; 202 base::ObserverList<Observer> observer_list_;
201 AutoResponseType auto_response_for_test_; 203 AutoResponseType auto_response_for_test_;
202 204
203 base::WeakPtrFactory<PermissionRequestManager> weak_factory_; 205 base::WeakPtrFactory<PermissionRequestManager> weak_factory_;
204 }; 206 };
205 207
206 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_ 208 #endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_REQUEST_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698