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

Side by Side Diff: content/public/browser/content_browser_client.cc

Issue 622793002: Group the different permission related methods in the content api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/public/browser/content_browser_client.h" 5 #include "content/public/browser/content_browser_client.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "ui/gfx/image/image_skia.h" 8 #include "ui/gfx/image/image_skia.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 } 220 }
221 221
222 blink::WebNotificationPermission 222 blink::WebNotificationPermission
223 ContentBrowserClient::CheckDesktopNotificationPermission( 223 ContentBrowserClient::CheckDesktopNotificationPermission(
224 const GURL& source_origin, 224 const GURL& source_origin,
225 ResourceContext* context, 225 ResourceContext* context,
226 int render_process_id) { 226 int render_process_id) {
227 return blink::WebNotificationPermissionAllowed; 227 return blink::WebNotificationPermissionAllowed;
228 } 228 }
229 229
230 void ContentBrowserClient::RequestGeolocationPermission( 230 void ContentBrowserClient::RequestPermission(
231 PermissionType permission,
231 WebContents* web_contents, 232 WebContents* web_contents,
232 int bridge_id, 233 int bridge_id,
233 const GURL& requesting_frame, 234 const GURL& requesting_frame,
234 bool user_gesture, 235 bool user_gesture,
235 const base::Callback<void(bool)>& result_callback) { 236 const base::Callback<void(bool)>& result_callback) {
236 result_callback.Run(true); 237 result_callback.Run(true);
237 } 238 }
238 239
239 // TODO(miguelg): replace all Create*Permission with a single
240 // CreatePermission(enum permission) method.
241 void ContentBrowserClient::CancelGeolocationPermissionRequest(
242 WebContents* web_contents,
243 int bridge_id,
244 const GURL& requesting_frame) {
245 }
246
247 void ContentBrowserClient::RequestMidiSysExPermission(
248 WebContents* web_contents,
249 int bridge_id,
250 const GURL& requesting_frame,
251 bool user_gesture,
252 base::Callback<void(bool)> result_callback,
253 base::Closure* cancel_callback) {
254 result_callback.Run(true);
255 }
256
257 void ContentBrowserClient::RequestProtectedMediaIdentifierPermission(
258 WebContents* web_contents,
259 const GURL& origin,
260 base::Callback<void(bool)> result_callback,
261 base::Closure* cancel_callback) {
262 result_callback.Run(true);
263 }
264
265 bool ContentBrowserClient::CanCreateWindow( 240 bool ContentBrowserClient::CanCreateWindow(
266 const GURL& opener_url, 241 const GURL& opener_url,
267 const GURL& opener_top_level_frame_url, 242 const GURL& opener_top_level_frame_url,
268 const GURL& source_origin, 243 const GURL& source_origin,
269 WindowContainerType container_type, 244 WindowContainerType container_type,
270 const GURL& target_url, 245 const GURL& target_url,
271 const Referrer& referrer, 246 const Referrer& referrer,
272 WindowOpenDisposition disposition, 247 WindowOpenDisposition disposition,
273 const blink::WebWindowFeatures& features, 248 const blink::WebWindowFeatures& features,
274 bool user_gesture, 249 bool user_gesture,
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 #endif 343 #endif
369 344
370 bool ContentBrowserClient::CheckMediaAccessPermission( 345 bool ContentBrowserClient::CheckMediaAccessPermission(
371 BrowserContext* browser_context, 346 BrowserContext* browser_context,
372 const GURL& security_origin, 347 const GURL& security_origin,
373 MediaStreamType type) { 348 MediaStreamType type) {
374 return false; 349 return false;
375 } 350 }
376 351
377 } // namespace content 352 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698