| 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/permission_type.h" | 19 #include "content/public/browser/permission_type.h" |
| 20 #include "content/public/common/content_client.h" | 20 #include "content/public/common/content_client.h" |
| 21 #include "content/public/common/media_stream_request.h" | 21 #include "content/public/common/media_stream_request.h" |
| 22 #include "content/public/common/permission_status.mojom.h" |
| 22 #include "content/public/common/resource_type.h" | 23 #include "content/public/common/resource_type.h" |
| 23 #include "content/public/common/socket_permission_request.h" | 24 #include "content/public/common/socket_permission_request.h" |
| 24 #include "content/public/common/window_container_type.h" | 25 #include "content/public/common/window_container_type.h" |
| 25 #include "net/base/mime_util.h" | 26 #include "net/base/mime_util.h" |
| 26 #include "net/cookies/canonical_cookie.h" | 27 #include "net/cookies/canonical_cookie.h" |
| 27 #include "net/url_request/url_request_interceptor.h" | 28 #include "net/url_request/url_request_interceptor.h" |
| 28 #include "net/url_request/url_request_job_factory.h" | 29 #include "net/url_request/url_request_job_factory.h" |
| 29 #include "storage/browser/fileapi/file_system_context.h" | 30 #include "storage/browser/fileapi/file_system_context.h" |
| 30 #include "ui/base/window_open_disposition.h" | 31 #include "ui/base/window_open_disposition.h" |
| 31 | 32 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 virtual void CancelPermissionRequest(PermissionType permission, | 432 virtual void CancelPermissionRequest(PermissionType permission, |
| 432 WebContents* web_contents, | 433 WebContents* web_contents, |
| 433 int bridge_id, | 434 int bridge_id, |
| 434 const GURL& requesting_frame) {} | 435 const GURL& requesting_frame) {} |
| 435 | 436 |
| 436 virtual void RegisterPermissionUsage(PermissionType permission, | 437 virtual void RegisterPermissionUsage(PermissionType permission, |
| 437 WebContents* web_contents, | 438 WebContents* web_contents, |
| 438 const GURL& frame_url, | 439 const GURL& frame_url, |
| 439 const GURL& main_frame_url) {} | 440 const GURL& main_frame_url) {} |
| 440 | 441 |
| 442 virtual PermissionStatus GetPermissionStatus( |
| 443 PermissionType permission, |
| 444 BrowserContext* browser_context, |
| 445 const GURL& requesting_origin, |
| 446 const GURL& embedding_origin); |
| 447 |
| 441 // Returns true if the given page is allowed to open a window of the given | 448 // Returns true if the given page is allowed to open a window of the given |
| 442 // type. If true is returned, |no_javascript_access| will indicate whether | 449 // type. If true is returned, |no_javascript_access| will indicate whether |
| 443 // the window that is created should be scriptable/in the same process. | 450 // the window that is created should be scriptable/in the same process. |
| 444 // This is called on the IO thread. | 451 // This is called on the IO thread. |
| 445 virtual bool CanCreateWindow(const GURL& opener_url, | 452 virtual bool CanCreateWindow(const GURL& opener_url, |
| 446 const GURL& opener_top_level_frame_url, | 453 const GURL& opener_top_level_frame_url, |
| 447 const GURL& source_origin, | 454 const GURL& source_origin, |
| 448 WindowContainerType container_type, | 455 WindowContainerType container_type, |
| 449 const GURL& target_url, | 456 const GURL& target_url, |
| 450 const Referrer& referrer, | 457 const Referrer& referrer, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 612 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
| 606 // implementation. Return NULL to disable external surface video. | 613 // implementation. Return NULL to disable external surface video. |
| 607 virtual ExternalVideoSurfaceContainer* | 614 virtual ExternalVideoSurfaceContainer* |
| 608 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 615 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
| 609 #endif | 616 #endif |
| 610 }; | 617 }; |
| 611 | 618 |
| 612 } // namespace content | 619 } // namespace content |
| 613 | 620 |
| 614 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 621 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
| OLD | NEW |