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

Unified Diff: services/dart/dart_app.h

Issue 816113004: Dart: Adds a content handler and a test. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address comments Created 5 years, 11 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/dart/dart_app.h
diff --git a/services/dart/dart_app.h b/services/dart/dart_app.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ce89ae76236dfd28d8be018ae0aa652ff18742f
--- /dev/null
+++ b/services/dart/dart_app.h
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_DART_DART_APP_H_
+#define SERVICES_DART_DART_APP_H_
+
+#include "mojo/application/content_handler_factory.h"
+#include "mojo/dart/embedder/dart_controller.h"
+#include "mojo/public/cpp/system/message_pipe.h"
+#include "mojo/public/interfaces/application/application.mojom.h"
+#include "mojo/public/interfaces/application/shell.mojom.h"
+
+namespace dart {
+
+class DartApp;
+class ApplicationDelegateImpl;
+
+// Each Dart app started by content handler runs on its own thread and
+// in its own Dart isolate. This class represents one running Dart app.
+
+class DartApp : public mojo::ContentHandlerFactory::HandledApplicationHolder {
+ public:
+ DartApp(mojo::ShellPtr shell, mojo::URLResponsePtr response);
+ virtual ~DartApp();
+
+ private:
+ void OnAppLoaded();
+
+ mojo::ShellPtr shell_;
+ mojo::dart::DartControllerConfig config_;
+ DISALLOW_COPY_AND_ASSIGN(DartApp);
+};
+
+} // namespace dart
+
+#endif // SERVICES_DART_DART_APP_H_
« 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