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 SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_ | 5 #ifndef SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_ |
6 #define SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_ | 6 #define SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "mojo/common/binding_set.h" | 10 #include "mojo/common/binding_set.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 public: | 28 public: |
29 ShellImpl(mojo::ApplicationPtr application, | 29 ShellImpl(mojo::ApplicationPtr application, |
30 ApplicationManager* manager, | 30 ApplicationManager* manager, |
31 const Identity& resolved_identity, | 31 const Identity& resolved_identity, |
32 const base::Closure& on_application_end); | 32 const base::Closure& on_application_end); |
33 | 33 |
34 ~ShellImpl() override; | 34 ~ShellImpl() override; |
35 | 35 |
36 void InitializeApplication(mojo::Array<mojo::String> args); | 36 void InitializeApplication(mojo::Array<mojo::String> args); |
37 | 37 |
38 void ConnectToClient( | 38 void ConnectToClient(const GURL& requested_url, |
39 const GURL& requested_url, | 39 const GURL& requestor_url, |
40 const GURL& requestor_url, | 40 mojo::InterfaceRequest<mojo::ServiceProvider> services); |
41 mojo::InterfaceRequest<mojo::ServiceProvider> services, | |
42 mojo::InterfaceHandle<mojo::ServiceProvider> exposed_services); | |
43 | 41 |
44 mojo::Application* application() { return application_.get(); } | 42 mojo::Application* application() { return application_.get(); } |
45 const Identity& identity() const { return identity_; } | 43 const Identity& identity() const { return identity_; } |
46 base::Closure on_application_end() const { return on_application_end_; } | 44 base::Closure on_application_end() const { return on_application_end_; } |
47 | 45 |
48 private: | 46 private: |
49 // This is a per-|ShellImpl| singleton. | 47 // This is a per-|ShellImpl| singleton. |
50 class ApplicationConnectorImpl : public mojo::ApplicationConnector { | 48 class ApplicationConnectorImpl : public mojo::ApplicationConnector { |
51 public: | 49 public: |
52 explicit ApplicationConnectorImpl(mojo::Shell* shell); | 50 explicit ApplicationConnectorImpl(mojo::Shell* shell); |
(...skipping 29 matching lines...) Expand all Loading... |
82 mojo::Binding<mojo::Shell> binding_; | 80 mojo::Binding<mojo::Shell> binding_; |
83 | 81 |
84 ApplicationConnectorImpl application_connector_impl_; | 82 ApplicationConnectorImpl application_connector_impl_; |
85 | 83 |
86 DISALLOW_COPY_AND_ASSIGN(ShellImpl); | 84 DISALLOW_COPY_AND_ASSIGN(ShellImpl); |
87 }; | 85 }; |
88 | 86 |
89 } // namespace shell | 87 } // namespace shell |
90 | 88 |
91 #endif // SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_ | 89 #endif // SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_ |
OLD | NEW |