Roll ANGLE e754fb8..6ffeb74
[chromium-blink-merge.git] / content / browser / frame_host / frame_mojo_shell.h
blob3c209d2e752ab1f427be7a7508c11e94348a0817
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
8 #include "base/macros.h"
9 #include "mojo/application/public/interfaces/shell.mojom.h"
10 #include "mojo/common/weak_binding_set.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
13 namespace content {
15 class RenderFrameHost;
17 // This provides the |mojo::Shell| service interface to each frame's
18 // ServiceRegistry, giving frames the ability to connect to Mojo applications.
19 class FrameMojoShell : public mojo::Shell {
20 public:
21 explicit FrameMojoShell(RenderFrameHost* frame_host);
22 ~FrameMojoShell() override;
24 void BindRequest(mojo::InterfaceRequest<mojo::Shell> shell_request);
26 private:
27 // mojo::Shell:
28 void ConnectToApplication(
29 mojo::URLRequestPtr application_url,
30 mojo::InterfaceRequest<mojo::ServiceProvider> services,
31 mojo::ServiceProviderPtr exposed_services) override;
32 void QuitApplication() override;
34 RenderFrameHost* frame_host_;
35 mojo::WeakBindingSet<mojo::Shell> bindings_;
37 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell);
40 } // namespace content
42 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_