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 MOJO_SHELL_SHELL_IMPL_H_ | 5 #ifndef MOJO_SHELL_SHELL_IMPL_H_ |
6 #define MOJO_SHELL_SHELL_IMPL_H_ | 6 #define MOJO_SHELL_SHELL_IMPL_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "mojo/application/public/interfaces/application.mojom.h" | 9 #include "mojo/application/public/interfaces/application.mojom.h" |
10 #include "mojo/application/public/interfaces/shell.mojom.h" | 10 #include "mojo/application/public/interfaces/shell.mojom.h" |
11 #include "mojo/public/cpp/bindings/binding.h" | 11 #include "mojo/public/cpp/bindings/binding.h" |
12 #include "mojo/public/cpp/bindings/error_handler.h" | 12 #include "mojo/public/cpp/bindings/error_handler.h" |
13 #include "mojo/shell/identity.h" | 13 #include "mojo/shell/identity.h" |
14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 namespace shell { | 17 namespace shell { |
18 | 18 |
19 class ApplicationManager; | 19 class ApplicationManager; |
20 | 20 |
21 class ShellImpl : public Shell, public ErrorHandler { | 21 class ShellImpl : public Shell, public ErrorHandler { |
22 public: | 22 public: |
23 ShellImpl(ApplicationPtr application, | 23 ShellImpl(ApplicationPtr application, |
24 ApplicationManager* manager, | 24 ApplicationManager* manager, |
25 const Identity& resolved_identity, | 25 const Identity& resolved_identity, |
26 const base::Closure& on_application_end); | 26 const base::Closure& on_application_end); |
27 | 27 |
28 ~ShellImpl() override; | 28 ~ShellImpl() override; |
29 | 29 |
30 void InitializeApplication(Array<String> args); | 30 void InitializeApplication(); |
31 | 31 |
32 void ConnectToClient(const GURL& requested_url, | 32 void ConnectToClient(const GURL& requested_url, |
33 const GURL& requestor_url, | 33 const GURL& requestor_url, |
34 InterfaceRequest<ServiceProvider> services, | 34 InterfaceRequest<ServiceProvider> services, |
35 ServiceProviderPtr exposed_services); | 35 ServiceProviderPtr exposed_services); |
36 | 36 |
37 Application* application() { return application_.get(); } | 37 Application* application() { return application_.get(); } |
38 const Identity& identity() const { return identity_; } | 38 const Identity& identity() const { return identity_; } |
39 base::Closure on_application_end() const { return on_application_end_; } | 39 base::Closure on_application_end() const { return on_application_end_; } |
40 | 40 |
(...skipping 12 matching lines...) Expand all Loading... |
53 ApplicationPtr application_; | 53 ApplicationPtr application_; |
54 Binding<Shell> binding_; | 54 Binding<Shell> binding_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(ShellImpl); | 56 DISALLOW_COPY_AND_ASSIGN(ShellImpl); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace shell | 59 } // namespace shell |
60 } // namespace mojo | 60 } // namespace mojo |
61 | 61 |
62 #endif // MOJO_SHELL_SHELL_IMPL_H_ | 62 #endif // MOJO_SHELL_SHELL_IMPL_H_ |
OLD | NEW |