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 <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/callback_forward.h" | 15 #include "base/callback_forward.h" |
16 #include "base/memory/linked_ptr.h" | 16 #include "base/memory/linked_ptr.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
19 #include "base/values.h" | 19 #include "base/values.h" |
20 #include "build/build_config.h" | 20 #include "build/build_config.h" |
21 #include "content/public/browser/certificate_request_result_type.h" | 21 #include "content/public/browser/certificate_request_result_type.h" |
22 #include "content/public/browser/navigation_throttle.h" | 22 #include "content/public/browser/navigation_throttle.h" |
23 #include "content/public/common/content_client.h" | 23 #include "content/public/common/content_client.h" |
24 #include "content/public/common/media_stream_request.h" | 24 #include "content/public/common/media_stream_request.h" |
| 25 #include "content/public/common/process_type.h" |
25 #include "content/public/common/resource_type.h" | 26 #include "content/public/common/resource_type.h" |
26 #include "content/public/common/socket_permission_request.h" | 27 #include "content/public/common/socket_permission_request.h" |
27 #include "content/public/common/window_container_type.h" | 28 #include "content/public/common/window_container_type.h" |
28 #include "net/base/mime_util.h" | 29 #include "net/base/mime_util.h" |
29 #include "net/cookies/canonical_cookie.h" | 30 #include "net/cookies/canonical_cookie.h" |
30 #include "net/url_request/url_request_interceptor.h" | 31 #include "net/url_request/url_request_interceptor.h" |
31 #include "net/url_request/url_request_job_factory.h" | 32 #include "net/url_request/url_request_job_factory.h" |
32 #include "storage/browser/fileapi/file_system_context.h" | 33 #include "storage/browser/fileapi/file_system_context.h" |
33 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 34 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
34 #include "ui/base/window_open_disposition.h" | 35 #include "ui/base/window_open_disposition.h" |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 // pp::FileIO::RequestOSFileHandle. | 647 // pp::FileIO::RequestOSFileHandle. |
647 virtual bool IsPluginAllowedToCallRequestOSFileHandle( | 648 virtual bool IsPluginAllowedToCallRequestOSFileHandle( |
648 BrowserContext* browser_context, | 649 BrowserContext* browser_context, |
649 const GURL& url); | 650 const GURL& url); |
650 | 651 |
651 // Returns true if dev channel APIs are available for plugins. | 652 // Returns true if dev channel APIs are available for plugins. |
652 virtual bool IsPluginAllowedToUseDevChannelAPIs( | 653 virtual bool IsPluginAllowedToUseDevChannelAPIs( |
653 BrowserContext* browser_context, | 654 BrowserContext* browser_context, |
654 const GURL& url); | 655 const GURL& url); |
655 | 656 |
| 657 // Returns the embedder's packaged Mojo application name. This is the name by |
| 658 // which the embedder's own ShellClient factory will be known to the Mojo |
| 659 // shell. An embedders should override this to make use of Mojo application |
| 660 // support. |
| 661 // |
| 662 // If this returns an empty string, the embedder will not be registered as an |
| 663 // application package. |
| 664 virtual std::string GetPackagedMojoApplicationName(); |
| 665 |
| 666 // Returns the Mojo application name to use when registering instances of a |
| 667 // child process with the shell. An embedder should override this to make |
| 668 // use of multiprocess Mojo application support. |
| 669 // |
| 670 // If this returns an empty string for a given process type, that type of |
| 671 // process is never registered with the shell. |
| 672 virtual std::string GetMojoApplicationNameForProcess(ProcessType type); |
| 673 |
| 674 // Resolves a Mojo application name to the contents of its manifest. An |
| 675 // embedder should override this to support builtin applications without |
| 676 // corresponding manifest files in the local filesystem. |
| 677 // |
| 678 // Returns |false| if no builtin manifest is available for the named |
| 679 // application. Otherwise it returns |true| and |*manifest_contents| is |
| 680 // populated with a JSON manifest. |
| 681 virtual bool GetMojoApplicationManifest(const base::StringPiece& name, |
| 682 std::string* manifest_contents); |
| 683 |
656 // Allows to register browser Mojo services exposed through the | 684 // Allows to register browser Mojo services exposed through the |
657 // RenderProcessHost. | 685 // RenderProcessHost. |
658 virtual void RegisterRenderProcessMojoServices(ServiceRegistry* registry) {} | 686 virtual void RegisterRenderProcessMojoServices(ServiceRegistry* registry) {} |
659 | 687 |
660 // Allows to register browser Mojo services exposed through the | 688 // Allows to register browser Mojo services exposed through the |
661 // FrameMojoShell. | 689 // FrameMojoShell. |
662 virtual void RegisterFrameMojoShellServices( | 690 virtual void RegisterFrameMojoShellServices( |
663 ServiceRegistry* registry, | 691 ServiceRegistry* registry, |
664 RenderFrameHost* render_frame_host) {} | 692 RenderFrameHost* render_frame_host) {} |
665 | 693 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
777 // Allows an embedder to provide its own ExternalVideoSurfaceContainer | 805 // Allows an embedder to provide its own ExternalVideoSurfaceContainer |
778 // implementation. Return nullptr to disable external surface video. | 806 // implementation. Return nullptr to disable external surface video. |
779 virtual ExternalVideoSurfaceContainer* | 807 virtual ExternalVideoSurfaceContainer* |
780 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); | 808 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); |
781 #endif | 809 #endif |
782 }; | 810 }; |
783 | 811 |
784 } // namespace content | 812 } // namespace content |
785 | 813 |
786 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ | 814 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ |
OLD | NEW |