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

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

Issue 1209283003: FrameMojoShell provides services to mojo apps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 5 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
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 "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
9 #include "mojo/application/public/interfaces/shell.mojom.h" 10 #include "mojo/application/public/interfaces/shell.mojom.h"
10 #include "mojo/common/weak_binding_set.h" 11 #include "mojo/common/weak_binding_set.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 class RenderFrameHost; 16 class RenderFrameHost;
17 class ServiceRegistryImpl;
16 18
17 // This provides the |mojo::Shell| service interface to each frame's 19 // This provides the |mojo::Shell| service interface to each frame's
18 // ServiceRegistry, giving frames the ability to connect to Mojo applications. 20 // ServiceRegistry, giving frames the ability to connect to Mojo applications.
19 class FrameMojoShell : public mojo::Shell { 21 class FrameMojoShell : public mojo::Shell {
20 public: 22 public:
21 explicit FrameMojoShell(RenderFrameHost* frame_host); 23 explicit FrameMojoShell(RenderFrameHost* frame_host);
22 ~FrameMojoShell() override; 24 ~FrameMojoShell() override;
23 25
24 void BindRequest(mojo::InterfaceRequest<mojo::Shell> shell_request); 26 void BindRequest(mojo::InterfaceRequest<mojo::Shell> shell_request);
25 27
26 private: 28 private:
27 // mojo::Shell: 29 // mojo::Shell:
28 void ConnectToApplication( 30 void ConnectToApplication(
29 mojo::URLRequestPtr application_url, 31 mojo::URLRequestPtr application_url,
30 mojo::InterfaceRequest<mojo::ServiceProvider> services, 32 mojo::InterfaceRequest<mojo::ServiceProvider> services,
31 mojo::ServiceProviderPtr exposed_services) override; 33 mojo::ServiceProviderPtr exposed_services) override;
32 void QuitApplication() override; 34 void QuitApplication() override;
33 35
36 ServiceRegistryImpl* GetServiceRegistry();
37
34 RenderFrameHost* frame_host_; 38 RenderFrameHost* frame_host_;
35 mojo::WeakBindingSet<mojo::Shell> bindings_; 39 mojo::WeakBindingSet<mojo::Shell> bindings_;
36 40
41 // ServiceRegistry providing browser services to connected applications.
42 scoped_ptr<ServiceRegistryImpl> service_registry_;
43 mojo::WeakBindingSet<mojo::ServiceProvider> service_provider_bindings_;
44
37 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell); 45 DISALLOW_COPY_AND_ASSIGN(FrameMojoShell);
38 }; 46 };
39 47
40 } // namespace content 48 } // namespace content
41 49
42 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_ 50 #endif // CONTENT_BROWSER_FRAME_HOST_FRAME_MOJO_SHELL_H_
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.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