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

Side by Side Diff: content/public/browser/content_browser_client.h

Issue 1828733004: Load application manifests from resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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 <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
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 embedder must override this and provide a corresponding manifest
660 // in order to customize the application capabilities of the browser process.
661 //
662 // If this returns an empty string, the embedder will not be registered as an
663 // application package. Defaults to "exe:content_browser".
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 must override this and provide
668 // corresponding manifests in order to customize the application capabilities
669 // of any content child process type.
670 //
671 // If this returns an empty string for a given process type, that type of
672 // process is never registered with the shell. Defaults to
673 // "exe:content_renderer" for renderer processes and the empty string for all
674 // other process types.
675 virtual std::string GetMojoApplicationNameForProcess(ProcessType type);
676
677 // Resolves a Mojo application name to the contents of its manifest. An
678 // embedder should override this to support builtin applications without
679 // corresponding manifest files in the local filesystem.
680 //
681 // Returns |false| if no builtin manifest is available for the named
682 // application. Otherwise it returns |true| and |*manifest_contents| is
683 // populated with a JSON manifest.
684 virtual bool GetMojoApplicationManifest(const base::StringPiece& name,
685 std::string* manifest_contents);
686
656 // Allows to register browser Mojo services exposed through the 687 // Allows to register browser Mojo services exposed through the
657 // RenderProcessHost. 688 // RenderProcessHost.
658 virtual void RegisterRenderProcessMojoServices(ServiceRegistry* registry) {} 689 virtual void RegisterRenderProcessMojoServices(ServiceRegistry* registry) {}
659 690
660 // Allows to register browser Mojo services exposed through the 691 // Allows to register browser Mojo services exposed through the
661 // FrameMojoShell. 692 // FrameMojoShell.
662 virtual void RegisterFrameMojoShellServices( 693 virtual void RegisterFrameMojoShellServices(
663 ServiceRegistry* registry, 694 ServiceRegistry* registry,
664 RenderFrameHost* render_frame_host) {} 695 RenderFrameHost* render_frame_host) {}
665 696
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 // Allows an embedder to provide its own ExternalVideoSurfaceContainer 808 // Allows an embedder to provide its own ExternalVideoSurfaceContainer
778 // implementation. Return nullptr to disable external surface video. 809 // implementation. Return nullptr to disable external surface video.
779 virtual ExternalVideoSurfaceContainer* 810 virtual ExternalVideoSurfaceContainer*
780 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents); 811 OverrideCreateExternalVideoSurfaceContainer(WebContents* web_contents);
781 #endif 812 #endif
782 }; 813 };
783 814
784 } // namespace content 815 } // namespace content
785 816
786 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 817 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698