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

Side by Side Diff: chrome/browser/guest_view/web_view/web_view_permission_helper.h

Issue 454253002: Location chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing meacer@ comments Created 6 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 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_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_
6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/metrics/user_metrics_action.h" 9 #include "base/metrics/user_metrics_action.h"
10 #include "chrome/browser/guest_view/guest_view_constants.h" 10 #include "chrome/browser/guest_view/guest_view_constants.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const content::MediaResponseCallback& callback); 59 const content::MediaResponseCallback& callback);
60 void CanDownload(content::RenderViewHost* render_view_host, 60 void CanDownload(content::RenderViewHost* render_view_host,
61 const GURL& url, 61 const GURL& url,
62 const std::string& request_method, 62 const std::string& request_method,
63 const base::Callback<void(bool)>& callback); 63 const base::Callback<void(bool)>& callback);
64 void RequestPointerLockPermission(bool user_gesture, 64 void RequestPointerLockPermission(bool user_gesture,
65 bool last_unlocked_by_target, 65 bool last_unlocked_by_target,
66 const base::Callback<void(bool)>& callback); 66 const base::Callback<void(bool)>& callback);
67 67
68 // Requests Geolocation Permission from the embedder. 68 // Requests Geolocation Permission from the embedder.
69 void RequestGeolocationPermission(int bridge_id, 69 void RequestGeolocationPermission(
70 const GURL& requesting_frame, 70 int bridge_id,
71 bool user_gesture, 71 const GURL& requesting_frame,
72 const base::Callback<void(bool)>& callback); 72 bool user_gesture,
73 const base::Callback<void(int, bool)>& callback);
73 void CancelGeolocationPermissionRequest(int bridge_id); 74 void CancelGeolocationPermissionRequest(int bridge_id);
74 75
75 void RequestFileSystemPermission(const GURL& url, 76 void RequestFileSystemPermission(const GURL& url,
76 bool allowed_by_default, 77 bool allowed_by_default,
77 const base::Callback<void(bool)>& callback); 78 const base::Callback<void(bool)>& callback);
78 79
79 // Called when file system access is requested by the guest content using the 80 // Called when file system access is requested by the guest content using the
80 // asynchronous HTML5 file system API. The request is plumbed through the 81 // asynchronous HTML5 file system API. The request is plumbed through the
81 // <webview> permission request API. The request will be: 82 // <webview> permission request API. The request will be:
82 // - Allowed if the embedder explicitly allowed it. 83 // - Allowed if the embedder explicitly allowed it.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 #endif // defined(ENABLE_PLUGIN_INSTALLATION) 148 #endif // defined(ENABLE_PLUGIN_INSTALLATION)
148 149
149 void OnPermissionResponse(const std::string& identifier, 150 void OnPermissionResponse(const std::string& identifier,
150 bool allow, 151 bool allow,
151 const std::string& user_input); 152 const std::string& user_input);
152 #endif // defiend(ENABLE_PLUGINS) 153 #endif // defiend(ENABLE_PLUGINS)
153 154
154 void OnGeolocationPermissionResponse( 155 void OnGeolocationPermissionResponse(
155 int bridge_id, 156 int bridge_id,
156 bool user_gesture, 157 bool user_gesture,
157 const base::Callback<void(bool)>& callback, 158 const base::Callback<void(int, bool)>& callback,
158 bool allow, 159 bool allow,
159 const std::string& user_input); 160 const std::string& user_input);
160 161
161 void OnFileSystemPermissionResponse( 162 void OnFileSystemPermissionResponse(
162 const base::Callback<void(bool)>& callback, 163 const base::Callback<void(bool)>& callback,
163 bool allow, 164 bool allow,
164 const std::string& user_input); 165 const std::string& user_input);
165 166
166 void OnMediaPermissionResponse( 167 void OnMediaPermissionResponse(
167 const content::MediaStreamRequest& request, 168 const content::MediaStreamRequest& request,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 std::map<int, int> bridge_id_to_request_id_map_; 206 std::map<int, int> bridge_id_to_request_id_map_;
206 207
207 WebViewGuest* web_view_guest_; 208 WebViewGuest* web_view_guest_;
208 209
209 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_; 210 base::WeakPtrFactory<WebViewPermissionHelper> weak_factory_;
210 211
211 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper); 212 DISALLOW_COPY_AND_ASSIGN(WebViewPermissionHelper);
212 }; 213 };
213 214
214 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_ 215 #endif // CHROME_BROWSER_GUEST_VIEW_WEB_VIEW_WEB_VIEW_PERMISSION_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698