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

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

Issue 2398783002: Rename a bunch of Mojo Application stuff to reference Services. (Closed)
Patch Set: . Created 4 years, 2 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 <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <utility> 13 #include <utility>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/callback_forward.h" 16 #include "base/callback_forward.h"
17 #include "base/memory/scoped_vector.h" 17 #include "base/memory/scoped_vector.h"
18 #include "base/values.h" 18 #include "base/values.h"
19 #include "build/build_config.h" 19 #include "build/build_config.h"
20 #include "content/public/browser/certificate_request_result_type.h" 20 #include "content/public/browser/certificate_request_result_type.h"
21 #include "content/public/browser/navigation_throttle.h" 21 #include "content/public/browser/navigation_throttle.h"
22 #include "content/public/common/content_client.h" 22 #include "content/public/common/content_client.h"
23 #include "content/public/common/media_stream_request.h" 23 #include "content/public/common/media_stream_request.h"
24 #include "content/public/common/mojo_application_info.h"
25 #include "content/public/common/resource_type.h" 24 #include "content/public/common/resource_type.h"
25 #include "content/public/common/service_info.h"
26 #include "content/public/common/socket_permission_request.h" 26 #include "content/public/common/socket_permission_request.h"
27 #include "content/public/common/window_container_type.h" 27 #include "content/public/common/window_container_type.h"
28 #include "media/audio/audio_manager.h" 28 #include "media/audio/audio_manager.h"
29 #include "net/base/mime_util.h" 29 #include "net/base/mime_util.h"
30 #include "net/cookies/canonical_cookie.h" 30 #include "net/cookies/canonical_cookie.h"
31 #include "storage/browser/fileapi/file_system_context.h" 31 #include "storage/browser/fileapi/file_system_context.h"
32 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 32 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
33 #include "ui/base/window_open_disposition.h" 33 #include "ui/base/window_open_disposition.h"
34 34
35 #if defined(OS_POSIX) && !defined(OS_MACOSX) 35 #if defined(OS_POSIX) && !defined(OS_MACOSX)
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 // pp::FileIO::RequestOSFileHandle. 642 // pp::FileIO::RequestOSFileHandle.
643 virtual bool IsPluginAllowedToCallRequestOSFileHandle( 643 virtual bool IsPluginAllowedToCallRequestOSFileHandle(
644 BrowserContext* browser_context, 644 BrowserContext* browser_context,
645 const GURL& url); 645 const GURL& url);
646 646
647 // Returns true if dev channel APIs are available for plugins. 647 // Returns true if dev channel APIs are available for plugins.
648 virtual bool IsPluginAllowedToUseDevChannelAPIs( 648 virtual bool IsPluginAllowedToUseDevChannelAPIs(
649 BrowserContext* browser_context, 649 BrowserContext* browser_context,
650 const GURL& url); 650 const GURL& url);
651 651
652 // Generate a Shell user-id for the supplied browser context. Defaults to 652 // Generate a Service user-id for the supplied browser context. Defaults to
653 // returning a random GUID. 653 // returning a random GUID.
654 virtual std::string GetShellUserIdForBrowserContext( 654 virtual std::string GetServiceUserIdForBrowserContext(
655 BrowserContext* browser_context); 655 BrowserContext* browser_context);
656 656
657 // Allows to register browser Mojo interfaces exposed through the 657 // Allows to register browser interfaces exposed through the
658 // RenderProcessHost. Note that interface factory callbacks added to 658 // RenderProcessHost. Note that interface factory callbacks added to
659 // |registry| will by default be run immediately on the IO thread, unless a 659 // |registry| will by default be run immediately on the IO thread, unless a
660 // task runner is provided. 660 // task runner is provided.
661 virtual void ExposeInterfacesToRenderer( 661 virtual void ExposeInterfacesToRenderer(
662 shell::InterfaceRegistry* registry, 662 shell::InterfaceRegistry* registry,
663 RenderProcessHost* render_process_host) {} 663 RenderProcessHost* render_process_host) {}
664 664
665 // Called when RenderFrameHostImpl connects to the Media service. Expose 665 // Called when RenderFrameHostImpl connects to the Media service. Expose
666 // interfaces to the service using |registry|. 666 // interfaces to the service using |registry|.
667 virtual void ExposeInterfacesToMediaService( 667 virtual void ExposeInterfacesToMediaService(
668 shell::InterfaceRegistry* registry, 668 shell::InterfaceRegistry* registry,
669 RenderFrameHost* render_frame_host) {} 669 RenderFrameHost* render_frame_host) {}
670 670
671 // Allows to register browser Mojo interfaces exposed through the 671 // Allows to register browser Mojo interfaces exposed through the
672 // RenderFrameHost. 672 // RenderFrameHost.
673 virtual void RegisterRenderFrameMojoInterfaces( 673 virtual void RegisterRenderFrameMojoInterfaces(
674 shell::InterfaceRegistry* registry, 674 shell::InterfaceRegistry* registry,
675 RenderFrameHost* render_frame_host) {} 675 RenderFrameHost* render_frame_host) {}
676 676
677 // Allows to register browser Mojo interfaces exposed through the 677 // Allows to register browser Mojo interfaces exposed through the
678 // GpuProcessHost. Called on the IO thread. Note that interface factory 678 // GpuProcessHost. Called on the IO thread. Note that interface factory
679 // callbacks added to |registry| will by default be run immediately on the IO 679 // callbacks added to |registry| will by default be run immediately on the IO
680 // thread, unless a task runner is provided. 680 // thread, unless a task runner is provided.
681 virtual void ExposeInterfacesToGpuProcess( 681 virtual void ExposeInterfacesToGpuProcess(
682 shell::InterfaceRegistry* registry, 682 shell::InterfaceRegistry* registry,
683 GpuProcessHost* render_process_host) {} 683 GpuProcessHost* render_process_host) {}
684 684
685 using StaticMojoApplicationMap = std::map<std::string, MojoApplicationInfo>; 685 using StaticServiceMap = std::map<std::string, ServiceInfo>;
686 686
687 // Registers Mojo applications to be loaded in the browser process by the 687 // Registers services to be loaded in the browser process by the Service
688 // browser's global Mojo shell. 688 // Manager.
689 virtual void RegisterInProcessMojoApplications( 689 virtual void RegisterInProcessServices(StaticServiceMap* services) {}
690 StaticMojoApplicationMap* apps) {}
691 690
692 using OutOfProcessMojoApplicationMap = std::map<std::string, base::string16>; 691 using OutOfProcessServiceMap = std::map<std::string, base::string16>;
693 692
694 // Registers Mojo applications to be loaded out of the browser process, in a 693 // Registers services to be loaded out of the browser process, in a sandboxed
695 // sandboxed utility process. The value of each map entry should be the 694 // utility process. The value of each map entry should be the process name to
696 // process name to use for the application's host process when launched. 695 // use for the service's host process when launched.
697 virtual void RegisterOutOfProcessMojoApplications( 696 virtual void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) {}
698 OutOfProcessMojoApplicationMap* apps) {}
699 697
700 // Registers Mojo applications to be loaded out of the browser process (in 698 // Registers services to be loaded out of the browser process (in a utility
701 // a utility process) without the sandbox. 699 // process) without the sandbox.
702 // 700 //
703 // WARNING: This path is NOT recommended! If a Mojo application needs a 701 // WARNING: This path is NOT recommended! If a service needs another service
704 // service that is only available out of the sandbox, it could ask the browser 702 // that is only available out of the sandbox, it could ask the browser
705 // process to provide it (e.g. through OverrideFrameMojoShellServices()). Only 703 // process to provide it. Only use this method when that approach does not
706 // use this method when that approach does not work. 704 // work.
707 virtual void RegisterUnsandboxedOutOfProcessMojoApplications( 705 virtual void RegisterUnsandboxedOutOfProcessServices(
708 OutOfProcessMojoApplicationMap* apps) {} 706 OutOfProcessServiceMap* services) {}
709 707
710 // Allow the embedder to provide a dictionary loaded from a JSON file 708 // Allow the embedder to provide a dictionary loaded from a JSON file
711 // resembling a service manifest whose capabilities section will be merged 709 // resembling a service manifest whose capabilities section will be merged
712 // with content's own for |name|. Additional entries will be appended to their 710 // with content's own for |name|. Additional entries will be appended to their
713 // respective sections. 711 // respective sections.
714 virtual std::unique_ptr<base::Value> GetServiceManifestOverlay( 712 virtual std::unique_ptr<base::Value> GetServiceManifestOverlay(
715 const std::string& name); 713 const std::string& name);
716 714
717 // Allows to override the visibility state of a RenderFrameHost. 715 // Allows to override the visibility state of a RenderFrameHost.
718 // |visibility_state| should not be null. It will only be set if needed. 716 // |visibility_state| should not be null. It will only be set if needed.
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // Returns whether the Win32k lockdown process mitigation should be applied to 789 // Returns whether the Win32k lockdown process mitigation should be applied to
792 // a process hosting a plugin with the specified |mime_type|. 790 // a process hosting a plugin with the specified |mime_type|.
793 virtual bool IsWin32kLockdownEnabledForMimeType( 791 virtual bool IsWin32kLockdownEnabledForMimeType(
794 const std::string& mime_type) const; 792 const std::string& mime_type) const;
795 #endif 793 #endif
796 }; 794 };
797 795
798 } // namespace content 796 } // namespace content
799 797
800 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 798 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/public/browser/browser_main_parts.h ('k') | content/public/browser/content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698