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

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: revert to a version with cleaner gypis Created 6 years 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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/memory/linked_ptr.h" 14 #include "base/memory/linked_ptr.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/scoped_vector.h" 16 #include "base/memory/scoped_vector.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "content/public/browser/certificate_request_result_type.h" 18 #include "content/public/browser/certificate_request_result_type.h"
19 #include "content/public/browser/desktop_notification_delegate.h" 19 #include "content/public/browser/desktop_notification_delegate.h"
20 #include "content/public/browser/permission_type.h" 20 #include "content/public/browser/permission_type.h"
21 #include "content/public/common/content_client.h" 21 #include "content/public/common/content_client.h"
22 #include "content/public/common/media_stream_request.h" 22 #include "content/public/common/media_stream_request.h"
23 #include "content/public/common/permission_status.mojom.h"
23 #include "content/public/common/resource_type.h" 24 #include "content/public/common/resource_type.h"
24 #include "content/public/common/socket_permission_request.h" 25 #include "content/public/common/socket_permission_request.h"
25 #include "content/public/common/window_container_type.h" 26 #include "content/public/common/window_container_type.h"
26 #include "net/base/mime_util.h" 27 #include "net/base/mime_util.h"
27 #include "net/cookies/canonical_cookie.h" 28 #include "net/cookies/canonical_cookie.h"
28 #include "net/url_request/url_request_interceptor.h" 29 #include "net/url_request/url_request_interceptor.h"
29 #include "net/url_request/url_request_job_factory.h" 30 #include "net/url_request/url_request_job_factory.h"
30 #include "storage/browser/fileapi/file_system_context.h" 31 #include "storage/browser/fileapi/file_system_context.h"
31 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" 32 #include "third_party/WebKit/public/platform/WebNotificationPermission.h"
32 #include "ui/base/window_open_disposition.h" 33 #include "ui/base/window_open_disposition.h"
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 virtual void CancelPermissionRequest(PermissionType permission, 447 virtual void CancelPermissionRequest(PermissionType permission,
447 WebContents* web_contents, 448 WebContents* web_contents,
448 int bridge_id, 449 int bridge_id,
449 const GURL& requesting_frame) {} 450 const GURL& requesting_frame) {}
450 451
451 virtual void RegisterPermissionUsage(PermissionType permission, 452 virtual void RegisterPermissionUsage(PermissionType permission,
452 WebContents* web_contents, 453 WebContents* web_contents,
453 const GURL& frame_url, 454 const GURL& frame_url,
454 const GURL& main_frame_url) {} 455 const GURL& main_frame_url) {}
455 456
457 virtual PermissionStatus GetPermissionStatus(
458 PermissionType permission,
459 BrowserContext* browser_context,
460 const GURL& requesting_origin,
461 const GURL& embedding_origin);
462
456 // Returns true if the given page is allowed to open a window of the given 463 // 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 464 // type. If true is returned, |no_javascript_access| will indicate whether
458 // the window that is created should be scriptable/in the same process. 465 // the window that is created should be scriptable/in the same process.
459 // This is called on the IO thread. 466 // This is called on the IO thread.
460 virtual bool CanCreateWindow(const GURL& opener_url, 467 virtual bool CanCreateWindow(const GURL& opener_url,
461 const GURL& opener_top_level_frame_url, 468 const GURL& opener_top_level_frame_url,
462 const GURL& source_origin, 469 const GURL& source_origin,
463 WindowContainerType container_type, 470 WindowContainerType container_type,
464 const GURL& target_url, 471 const GURL& target_url,
465 const Referrer& referrer, 472 const Referrer& referrer,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 // camera. Note that this does not query the user. |type| must be 630 // camera. Note that this does not query the user. |type| must be
624 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE. 631 // MEDIA_DEVICE_AUDIO_CAPTURE or MEDIA_DEVICE_VIDEO_CAPTURE.
625 virtual bool CheckMediaAccessPermission(BrowserContext* browser_context, 632 virtual bool CheckMediaAccessPermission(BrowserContext* browser_context,
626 const GURL& security_origin, 633 const GURL& security_origin,
627 MediaStreamType type); 634 MediaStreamType type);
628 }; 635 };
629 636
630 } // namespace content 637 } // namespace content
631 638
632 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 639 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698