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

Unified Diff: services/js/js_app_shell.h

Issue 757703002: Creates a JavaScript Applicaiton (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Do not try to call undefined Application methods. Created 6 years, 1 month 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
Index: services/js/js_app_shell.h
diff --git a/services/js/js_app_shell.h b/services/js/js_app_shell.h
new file mode 100644
index 0000000000000000000000000000000000000000..9eaaa1d0a65669950d14331b83dea0ce7134ed78
--- /dev/null
+++ b/services/js/js_app_shell.h
@@ -0,0 +1,42 @@
+// 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 MOJO_SERVICES_JS_JS_APP_SHELL_H_
+#define MOJO_SERVICES_JS_JS_APP_SHELL_H_
+
+#include "gin/handle.h"
+#include "gin/wrappable.h"
+#include "mojo/edk/js/handle.h"
+
+namespace mojo {
+namespace js {
+
+class JSApp;
+
+class JSAppShell : public gin::Wrappable<JSAppShell> {
+ public:
+ static gin::WrapperInfo kWrapperInfo;
+ static gin::Handle<JSAppShell> Create(v8::Isolate* isolate, JSApp* js_app);
+
+ private:
+ JSAppShell(JSApp* js_app);
abarth-chromium 2014/11/24 23:47:24 explicit
hansmuller 2014/11/25 00:31:55 Done.
+ ~JSAppShell() override;
+
+ // gin::WrappableBase
+ gin::ObjectTemplateBuilder GetObjectTemplateBuilder(v8::Isolate* isolate)
+ override;
+
+ // Bound to JS method "connectToApplication".
+ void ConnectToApplication(
+ const std::string& application_url, mojo::Handle service_provider);
+
+ JSApp* js_app_;
+
+ DISALLOW_COPY_AND_ASSIGN(JSAppShell);
+};
+
+} // namespace js
+} // namespace mojo
+
+#endif // MOJO_SERVICES_JS_JS_APP_SHELL_H_

Powered by Google App Engine
This is Rietveld 408576698