OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 SERVICES_DART_DART_APP_H_ | 5 #ifndef SERVICES_DART_DART_APP_H_ |
6 #define SERVICES_DART_DART_APP_H_ | 6 #define SERVICES_DART_DART_APP_H_ |
7 | 7 |
8 #include "mojo/application/content_handler_factory.h" | 8 #include "mojo/application/content_handler_factory.h" |
9 #include "mojo/dart/embedder/dart_controller.h" | 9 #include "mojo/dart/embedder/dart_controller.h" |
10 #include "mojo/public/cpp/system/message_pipe.h" | 10 #include "mojo/public/cpp/system/message_pipe.h" |
11 #include "mojo/public/interfaces/application/application.mojom.h" | 11 #include "mojo/public/interfaces/application/application.mojom.h" |
12 #include "mojo/public/interfaces/application/shell.mojom.h" | 12 #include "mojo/public/interfaces/application/shell.mojom.h" |
13 | 13 |
14 namespace dart { | 14 namespace dart { |
15 | 15 |
16 class DartApp; | 16 class DartApp; |
17 class ApplicationDelegateImpl; | 17 class ApplicationDelegateImpl; |
18 | 18 |
19 // Each Dart app started by content handler runs on its own thread and | 19 // Each Dart app started by content handler runs on its own thread and |
20 // in its own Dart isolate. This class represents one running Dart app. | 20 // in its own Dart isolate. This class represents one running Dart app. |
21 | 21 |
22 class DartApp : public mojo::ContentHandlerFactory::HandledApplicationHolder { | 22 class DartApp : public mojo::ContentHandlerFactory::HandledApplicationHolder { |
23 public: | 23 public: |
24 DartApp(mojo::ShellPtr shell, mojo::URLResponsePtr response); | 24 DartApp(mojo::InterfaceRequest<mojo::Application> application_request, |
| 25 mojo::URLResponsePtr response); |
25 virtual ~DartApp(); | 26 virtual ~DartApp(); |
26 | 27 |
27 private: | 28 private: |
28 void OnAppLoaded(); | 29 void OnAppLoaded(); |
29 | 30 |
30 mojo::ShellPtr shell_; | 31 mojo::InterfaceRequest<mojo::Application> application_request_; |
31 mojo::dart::DartControllerConfig config_; | 32 mojo::dart::DartControllerConfig config_; |
32 DISALLOW_COPY_AND_ASSIGN(DartApp); | 33 DISALLOW_COPY_AND_ASSIGN(DartApp); |
33 }; | 34 }; |
34 | 35 |
35 } // namespace dart | 36 } // namespace dart |
36 | 37 |
37 #endif // SERVICES_DART_DART_APP_H_ | 38 #endif // SERVICES_DART_DART_APP_H_ |
OLD | NEW |