OLD | NEW |
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" | |
24 #include "content/public/common/resource_type.h" | 23 #include "content/public/common/resource_type.h" |
25 #include "content/public/common/socket_permission_request.h" | 24 #include "content/public/common/socket_permission_request.h" |
26 #include "content/public/common/window_container_type.h" | 25 #include "content/public/common/window_container_type.h" |
27 #include "net/base/mime_util.h" | 26 #include "net/base/mime_util.h" |
28 #include "net/cookies/canonical_cookie.h" | 27 #include "net/cookies/canonical_cookie.h" |
29 #include "net/url_request/url_request_interceptor.h" | 28 #include "net/url_request/url_request_interceptor.h" |
30 #include "net/url_request/url_request_job_factory.h" | 29 #include "net/url_request/url_request_job_factory.h" |
31 #include "storage/browser/fileapi/file_system_context.h" | 30 #include "storage/browser/fileapi/file_system_context.h" |
32 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" | 31 #include "third_party/WebKit/public/platform/WebNotificationPermission.h" |
33 #include "ui/base/window_open_disposition.h" | 32 #include "ui/base/window_open_disposition.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 virtual void CancelPermissionRequest(PermissionType permission, | 446 virtual void CancelPermissionRequest(PermissionType permission, |
448 WebContents* web_contents, | 447 WebContents* web_contents, |
449 int bridge_id, | 448 int bridge_id, |
450 const GURL& requesting_frame) {} | 449 const GURL& requesting_frame) {} |
451 | 450 |
452 virtual void RegisterPermissionUsage(PermissionType permission, | 451 virtual void RegisterPermissionUsage(PermissionType permission, |
453 WebContents* web_contents, | 452 WebContents* web_contents, |
454 const GURL& frame_url, | 453 const GURL& frame_url, |
455 const GURL& main_frame_url) {} | 454 const GURL& main_frame_url) {} |
456 | 455 |
457 virtual PermissionStatus GetPermissionStatus( | |
458 PermissionType permission, | |
459 BrowserContext* browser_context, | |
460 const GURL& requesting_origin, | |
461 const GURL& embedding_origin); | |
462 | |
463 // Returns true if the given page is allowed to open a window of the given | 456 // Returns true if the given page is allowed to open a window of the given |
464 // type. If true is returned, |no_javascript_access| will indicate whether | 457 // type. If true is returned, |no_javascript_access| will indicate whether |
465 // the window that is created should be scriptable/in the same process. | 458 // the window that is created should be scriptable/in the same process. |
466 // This is called on the IO thread. | 459 // This is called on the IO thread. |
467 virtual bool CanCreateWindow(const GURL& opener_url, | 460 virtual bool CanCreateWindow(const GURL& opener_url, |
468 const GURL& opener_top_level_frame_url, | 461 const GURL& opener_top_level_frame_url, |
469 const GURL& source_origin, | 462 const GURL& source_origin, |
470 WindowContainerType container_type, | 463 WindowContainerType container_type, |
471 const GURL& target_url, | 464 const GURL& target_url, |
472 const Referrer& referrer, | 465 const Referrer& referrer, |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 620 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
628 // implementation. Return NULL to disable external surface video. | 621 // implementation. Return NULL to disable external surface video. |
629 virtual ExternalVideoSurfaceContainer* | 622 virtual ExternalVideoSurfaceContainer* |
630 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 623 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
631 #endif | 624 #endif |
632 }; | 625 }; |
633 | 626 |
634 } // namespace content | 627 } // namespace content |
635 | 628 |
636 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 629 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |