| OLD | NEW |
| 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 "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "mojo/common/weak_binding_set.h" | 10 #include "mojo/common/weak_binding_set.h" |
| 11 #include "mojo/public/cpp/bindings/interface_request.h" | 11 #include "mojo/public/cpp/bindings/interface_request.h" |
| 12 #include "mojo/shell/public/interfaces/shell.mojom.h" | 12 #include "mojo/shell/public/interfaces/shell.mojom.h" |
| 13 | 13 |
| 14 namespace content { | 14 namespace content { |
| 15 | 15 |
| 16 class RenderFrameHost; | 16 class RenderFrameHost; |
| 17 class ServiceRegistryImpl; | 17 class ServiceRegistryImpl; |
| 18 | 18 |
| 19 // This provides the |mojo::Shell| service interface to each frame's | 19 // This provides the |mojo::shell::mojom::Shell| service interface to each |
| 20 // ServiceRegistry, giving frames the ability to connect to Mojo applications. | 20 // frame's ServiceRegistry, giving frames the ability to connect to Mojo |
| 21 class FrameMojoShell : public mojo::Shell { | 21 // applications. |
| 22 class FrameMojoShell : public mojo::shell::mojom::Shell { |
| 22 public: | 23 public: |
| 23 explicit FrameMojoShell(RenderFrameHost* frame_host); | 24 explicit FrameMojoShell(RenderFrameHost* frame_host); |
| 24 ~FrameMojoShell() override; | 25 ~FrameMojoShell() override; |
| 25 | 26 |
| 26 void BindRequest(mojo::InterfaceRequest<mojo::Shell> shell_request); | 27 void BindRequest( |
| 28 mojo::InterfaceRequest<mojo::shell::mojom::Shell> shell_request); |
| 27 | 29 |
| 28 private: | 30 private: |
| 29 // mojo::Shell: | 31 // mojo::Shell: |
| 30 void ConnectToApplication( | 32 void ConnectToApplication( |
| 31 mojo::URLRequestPtr application_url, | 33 mojo::URLRequestPtr application_url, |
| 32 mojo::InterfaceRequest<mojo::ServiceProvider> services, | 34 mojo::InterfaceRequest<mojo::ServiceProvider> services, |
| 33 mojo::ServiceProviderPtr exposed_services, | 35 mojo::ServiceProviderPtr exposed_services, |
| 34 mojo::CapabilityFilterPtr filter, | 36 mojo::shell::mojom::CapabilityFilterPtr filter, |
| 35 const ConnectToApplicationCallback& callback) override; | 37 const ConnectToApplicationCallback& callback) override; |
| 36 void QuitApplication() override; | 38 void QuitApplication() override; |
| 37 | 39 |
| 38 ServiceRegistryImpl* GetServiceRegistry(); | 40 ServiceRegistryImpl* GetServiceRegistry(); |
| 39 | 41 |
| 40 RenderFrameHost* frame_host_; | 42 RenderFrameHost* frame_host_; |
| 41 mojo::WeakBindingSet<mojo::Shell> bindings_; | 43 mojo::WeakBindingSet<mojo::shell::mojom::Shell> bindings_; |
| 42 | 44 |
| 43 // ServiceRegistry providing browser services to connected applications. | 45 // ServiceRegistry providing browser services to connected applications. |
| 44 scoped_ptr<ServiceRegistryImpl> service_registry_; | 46 scoped_ptr<ServiceRegistryImpl> service_registry_; |
| 45 mojo::WeakBindingSet<mojo::ServiceProvider> service_provider_bindings_; | 47 mojo::WeakBindingSet<mojo::ServiceProvider> service_provider_bindings_; |
| 46 | 48 |
| 47 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell); | 49 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell); |
| 48 }; | 50 }; |
| 49 | 51 |
| 50 } // namespace content | 52 } // namespace content |
| 51 | 53 |
| 52 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_ | 54 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_ |
| OLD | NEW |