| 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 virtual void CancelPermissionRequest(PermissionType permission, | 448 virtual void CancelPermissionRequest(PermissionType permission, |
| 450 WebContents* web_contents, | 449 WebContents* web_contents, |
| 451 int bridge_id, | 450 int bridge_id, |
| 452 const GURL& requesting_frame) {} | 451 const GURL& requesting_frame) {} |
| 453 | 452 |
| 454 virtual void RegisterPermissionUsage(PermissionType permission, | 453 virtual void RegisterPermissionUsage(PermissionType permission, |
| 455 WebContents* web_contents, | 454 WebContents* web_contents, |
| 456 const GURL& frame_url, | 455 const GURL& frame_url, |
| 457 const GURL& main_frame_url) {} | 456 const GURL& main_frame_url) {} |
| 458 | 457 |
| 459 virtual PermissionStatus GetPermissionStatus( | |
| 460 PermissionType permission, | |
| 461 BrowserContext* browser_context, | |
| 462 const GURL& requesting_origin, | |
| 463 const GURL& embedding_origin); | |
| 464 | |
| 465 // Returns true if the given page is allowed to open a window of the given | 458 // Returns true if the given page is allowed to open a window of the given |
| 466 // type. If true is returned, |no_javascript_access| will indicate whether | 459 // type. If true is returned, |no_javascript_access| will indicate whether |
| 467 // the window that is created should be scriptable/in the same process. | 460 // the window that is created should be scriptable/in the same process. |
| 468 // This is called on the IO thread. | 461 // This is called on the IO thread. |
| 469 virtual bool CanCreateWindow(const GURL& opener_url, | 462 virtual bool CanCreateWindow(const GURL& opener_url, |
| 470 const GURL& opener_top_level_frame_url, | 463 const GURL& opener_top_level_frame_url, |
| 471 const GURL& source_origin, | 464 const GURL& source_origin, |
| 472 WindowContainerType container_type, | 465 WindowContainerType container_type, |
| 473 const GURL& target_url, | 466 const GURL& target_url, |
| 474 const Referrer& referrer, | 467 const Referrer& referrer, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 622 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
| 630 // implementation. Return NULL to disable external surface video. | 623 // implementation. Return NULL to disable external surface video. |
| 631 virtual ExternalVideoSurfaceContainer* | 624 virtual ExternalVideoSurfaceContainer* |
| 632 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 625 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
| 633 #endif | 626 #endif |
| 634 }; | 627 }; |
| 635 | 628 |
| 636 } // namespace content | 629 } // namespace content |
| 637 | 630 |
| 638 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 631 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |