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

Side by Side Diff: content/browser/frame_host/frame_mojo_shell.h

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
Patch Set: . Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "mojo/public/cpp/bindings/binding_set.h" 11 #include "mojo/public/cpp/bindings/binding_set.h"
12 #include "mojo/public/cpp/bindings/interface_request.h" 12 #include "mojo/public/cpp/bindings/interface_request.h"
13 #include "services/shell/public/interfaces/connector.mojom.h" 13 #include "services/shell/public/interfaces/connector.mojom.h"
14 14
15 namespace shell {
16 class InterfaceRegistry;
17 }
18
15 namespace content { 19 namespace content {
20 class RenderFrameHost;
16 21
17 class RenderFrameHost; 22 // This provides the |shell::mojom::Connector| interface interface to each
18 class ServiceRegistryImpl; 23 // frame's shell::InterfaceRegistry, giving frames the ability to connect to
19 24 // Mojo services.
20 // This provides the |shell::mojom::Shell| service interface to each
21 // frame's ServiceRegistry, giving frames the ability to connect to Mojo
22 // applications.
23 class FrameMojoShell : public shell::mojom::Connector { 25 class FrameMojoShell : public shell::mojom::Connector {
24 public: 26 public:
25 explicit FrameMojoShell(RenderFrameHost* frame_host); 27 explicit FrameMojoShell(RenderFrameHost* frame_host);
26 ~FrameMojoShell() override; 28 ~FrameMojoShell() override;
27 29
28 void BindRequest(shell::mojom::ConnectorRequest request); 30 void BindRequest(shell::mojom::ConnectorRequest request);
29 31
30 private: 32 private:
31 // shell::Connector: 33 // shell::Connector:
32 void Connect( 34 void Connect(
33 shell::mojom::IdentityPtr target, 35 shell::mojom::IdentityPtr target,
34 shell::mojom::InterfaceProviderRequest services, 36 shell::mojom::InterfaceProviderRequest services,
35 shell::mojom::InterfaceProviderPtr exposed_services, 37 shell::mojom::InterfaceProviderPtr exposed_services,
36 shell::mojom::ClientProcessConnectionPtr client_process_connection, 38 shell::mojom::ClientProcessConnectionPtr client_process_connection,
37 const shell::mojom::Connector::ConnectCallback& callback) override; 39 const shell::mojom::Connector::ConnectCallback& callback) override;
38 void Clone(shell::mojom::ConnectorRequest request) override; 40 void Clone(shell::mojom::ConnectorRequest request) override;
39 41
40 ServiceRegistryImpl* GetServiceRegistry(); 42 shell::InterfaceRegistry* GetInterfaceRegistry();
41 43
42 RenderFrameHost* frame_host_; 44 RenderFrameHost* frame_host_;
43 mojo::BindingSet<shell::mojom::Connector> connectors_; 45 mojo::BindingSet<shell::mojom::Connector> connectors_;
44 46
45 // ServiceRegistry providing browser services to connected applications. 47 // shell::InterfaceRegistry providing browser interfaces to connected
46 std::unique_ptr<ServiceRegistryImpl> service_registry_; 48 // applications.
47 mojo::BindingSet<shell::mojom::InterfaceProvider> service_provider_bindings_; 49 std::unique_ptr<shell::InterfaceRegistry> interface_registry_;
50 mojo::BindingSet<shell::mojom::InterfaceProvider>
51 interface_provider_bindings_;
48 52
49 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell); 53 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell);
50 }; 54 };
51 55
52 } // namespace content 56 } // namespace content
53 57
54 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_ 58 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
OLDNEW
« no previous file with comments | « content/browser/android/service_registry_android_impl.cc ('k') | content/browser/frame_host/frame_mojo_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698