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

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

Issue 750633003: Implement HasPermission() method in PermissionService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 6 #define CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 445
446 virtual void CancelPermissionRequest(PermissionType permission, 446 virtual void CancelPermissionRequest(PermissionType permission,
447 WebContents* web_contents, 447 WebContents* web_contents,
448 int bridge_id, 448 int bridge_id,
449 const GURL& requesting_frame) {} 449 const GURL& requesting_frame) {}
450 450
451 virtual void RegisterPermissionUsage(PermissionType permission, 451 virtual void RegisterPermissionUsage(PermissionType permission,
452 WebContents* web_contents, 452 WebContents* web_contents,
453 const GURL& frame_url, 453 const GURL& frame_url,
454 const GURL& main_frame_url) {} 454 const GURL& main_frame_url) {}
455 virtual void HasPermission(
456 PermissionType permission,
457 WebContents* web_contents,
458 const GURL& requesting_frame,
459 const base::Callback<void(bool)>& result_callback);
455 460
456 // Returns true if the given page is allowed to open a window of the given 461 // Returns true if the given page is allowed to open a window of the given
457 // type. If true is returned, |no_javascript_access| will indicate whether 462 // type. If true is returned, |no_javascript_access| will indicate whether
458 // the window that is created should be scriptable/in the same process. 463 // the window that is created should be scriptable/in the same process.
459 // This is called on the IO thread. 464 // This is called on the IO thread.
460 virtual bool CanCreateWindow(const GURL& opener_url, 465 virtual bool CanCreateWindow(const GURL& opener_url,
461 const GURL& opener_top_level_frame_url, 466 const GURL& opener_top_level_frame_url,
462 const GURL& source_origin, 467 const GURL& source_origin,
463 WindowContainerType container_type, 468 WindowContainerType container_type,
464 const GURL& target_url, 469 const GURL& target_url,
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // camera. Note that this does not query the user. |type| must be 628 // camera. Note that this does not query the user. |type| must be
624 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. 629 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE.
625 virtual bool CheckMediaAccessPermission(BrowserContext* browser_context, 630 virtual bool CheckMediaAccessPermission(BrowserContext* browser_context,
626 const GURL& security_origin, 631 const GURL& security_origin,
627 MediaStreamType type); 632 MediaStreamType type);
628 }; 633 };
629 634
630 } // namespace content 635 } // namespace content
631 636
632 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 637 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698