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

Side by Side Diff: services/dart/dart_app.h

Issue 1262493002: Enable HTTP loading in Mojo dart content handler (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « services/dart/content_handler_main.cc ('k') | services/dart/dart_app.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "mojo/application/content_handler_factory.h" 9 #include "mojo/application/content_handler_factory.h"
10 #include "mojo/dart/embedder/dart_controller.h" 10 #include "mojo/dart/embedder/dart_controller.h"
11 #include "mojo/public/cpp/system/message_pipe.h" 11 #include "mojo/public/cpp/system/message_pipe.h"
12 #include "mojo/public/interfaces/application/application.mojom.h" 12 #include "mojo/public/interfaces/application/application.mojom.h"
13 #include "mojo/public/interfaces/application/shell.mojom.h" 13 #include "mojo/public/interfaces/application/shell.mojom.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 class DartApp; 17 class DartApp;
18 class ApplicationDelegateImpl; 18 class ApplicationDelegateImpl;
19 19
20 // Each Dart app started by content handler runs on its own thread and 20 // Each Dart app started by content handler runs on its own thread and
21 // in its own Dart isolate. This class represents one running Dart app. 21 // in its own Dart isolate. This class represents one running Dart app.
22 22
23 class DartApp : public mojo::ContentHandlerFactory::HandledApplicationHolder { 23 class DartApp : public mojo::ContentHandlerFactory::HandledApplicationHolder {
24 public: 24 public:
25 // When running from an extracted zip file.
25 DartApp(mojo::InterfaceRequest<mojo::Application> application_request, 26 DartApp(mojo::InterfaceRequest<mojo::Application> application_request,
26 const base::FilePath& application_dir, 27 const base::FilePath& application_dir,
27 bool strict); 28 bool strict);
29 // When running from a dart file.
30 DartApp(mojo::InterfaceRequest<mojo::Application> application_request,
31 const std::string& url,
32 bool strict);
28 virtual ~DartApp(); 33 virtual ~DartApp();
29 34
30 private: 35 private:
31 void OnAppLoaded(); 36 void OnAppLoaded();
32 37
33 mojo::InterfaceRequest<mojo::Application> application_request_; 38 mojo::InterfaceRequest<mojo::Application> application_request_;
34 mojo::dart::DartControllerConfig config_; 39 mojo::dart::DartControllerConfig config_;
35 base::FilePath application_dir_; 40 base::FilePath application_dir_;
36 41
37 DISALLOW_COPY_AND_ASSIGN(DartApp); 42 DISALLOW_COPY_AND_ASSIGN(DartApp);
38 }; 43 };
39 44
40 } // namespace dart 45 } // namespace dart
41 46
42 #endif // SERVICES_DART_DART_APP_H_ 47 #endif // SERVICES_DART_DART_APP_H_
OLDNEW
« no previous file with comments | « services/dart/content_handler_main.cc ('k') | services/dart/dart_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698