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

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

Issue 2947413002: Restrict CM API interface request and message dispatch. (Closed)
Patch Set: Addressed comments, and used an associated interface. Created 3 years, 5 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 namespace gpu { 60 namespace gpu {
61 class GpuChannelEstablishFactory; 61 class GpuChannelEstablishFactory;
62 } 62 }
63 63
64 namespace media { 64 namespace media {
65 class AudioLogFactory; 65 class AudioLogFactory;
66 class AudioManager; 66 class AudioManager;
67 class CdmFactory; 67 class CdmFactory;
68 } 68 }
69 69
70 namespace mojo {
71 class ScopedInterfaceEndpointHandle;
72 }
73
70 namespace service_manager { 74 namespace service_manager {
71 class Service; 75 class Service;
72 struct BindSourceInfo; 76 struct BindSourceInfo;
73 } 77 }
74 78
75 namespace net { 79 namespace net {
76 class ClientCertIdentity; 80 class ClientCertIdentity;
77 using ClientCertIdentityList = std::vector<std::unique_ptr<ClientCertIdentity>>; 81 using ClientCertIdentityList = std::vector<std::unique_ptr<ClientCertIdentity>>;
78 class CookieOptions; 82 class CookieOptions;
79 class NetLog; 83 class NetLog;
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 RenderFrameHost* render_frame_host) {} 653 RenderFrameHost* render_frame_host) {}
650 654
651 // Content was unable to bind a request for this interface, so the embedder 655 // Content was unable to bind a request for this interface, so the embedder
652 // should try. 656 // should try.
653 virtual void BindInterfaceRequestFromFrame( 657 virtual void BindInterfaceRequestFromFrame(
654 RenderFrameHost* render_frame_host, 658 RenderFrameHost* render_frame_host,
655 const service_manager::BindSourceInfo& source_info, 659 const service_manager::BindSourceInfo& source_info,
656 const std::string& interface_name, 660 const std::string& interface_name,
657 mojo::ScopedMessagePipeHandle interface_pipe) {} 661 mojo::ScopedMessagePipeHandle interface_pipe) {}
658 662
663 // Content was unable to bind a request for this associated interface, so the
664 // embedder should try.
665 virtual void BindAssociatedInterfaceRequestFromFrame(
Ken Rockot(use gerrit already) 2017/06/30 21:11:24 Please consider making this return a bool and take
engedy 2017/06/30 22:27:01 All done, please take a final look.
666 RenderFrameHost* render_frame_host,
667 const service_manager::BindSourceInfo& source_info,
668 const std::string& interface_name,
669 mojo::ScopedInterfaceEndpointHandle handle) {}
670
659 // (Currently called only from GPUProcessHost, move somewhere more central). 671 // (Currently called only from GPUProcessHost, move somewhere more central).
660 // Called when a request to bind |interface_name| on |interface_pipe| is 672 // Called when a request to bind |interface_name| on |interface_pipe| is
661 // received from |source_info.identity|. If the request is bound, 673 // received from |source_info.identity|. If the request is bound,
662 // |interface_pipe| will become invalid (taken by the client). 674 // |interface_pipe| will become invalid (taken by the client).
663 virtual void BindInterfaceRequest( 675 virtual void BindInterfaceRequest(
664 const service_manager::BindSourceInfo& source_info, 676 const service_manager::BindSourceInfo& source_info,
665 const std::string& interface_name, 677 const std::string& interface_name,
666 mojo::ScopedMessagePipeHandle* interface_pipe) {} 678 mojo::ScopedMessagePipeHandle* interface_pipe) {}
667 679
668 using StaticServiceMap = 680 using StaticServiceMap =
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 // Allows the embedder to register one or more URLLoaderThrottles for a 816 // Allows the embedder to register one or more URLLoaderThrottles for a
805 // URL request. This is used only when --enable-network-service is in effect. 817 // URL request. This is used only when --enable-network-service is in effect.
806 // This is called on the IO thread. 818 // This is called on the IO thread.
807 virtual std::vector<std::unique_ptr<URLLoaderThrottle>> 819 virtual std::vector<std::unique_ptr<URLLoaderThrottle>>
808 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter); 820 CreateURLLoaderThrottles(const base::Callback<WebContents*()>& wc_getter);
809 }; 821 };
810 822
811 } // namespace content 823 } // namespace content
812 824
813 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_ 825 #endif // CONTENT_PUBLIC_BROWSER_CONTENT_BROWSER_CLIENT_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698