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

Unified Diff: sky/engine/core/app/Module.h

Issue 697873007: Add Module and Application interfaces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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: sky/engine/core/app/Module.h
diff --git a/sky/engine/core/app/Module.h b/sky/engine/core/app/Module.h
new file mode 100644
index 0000000000000000000000000000000000000000..e5b41f235d9bd436b1e84917d7a7b46fc153d1f3
--- /dev/null
+++ b/sky/engine/core/app/Module.h
@@ -0,0 +1,39 @@
+// 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 SKY_ENGINE_CORE_APP_MODULE_H_
+#define SKY_ENGINE_CORE_APP_MODULE_H_
+
+#include "core/app/AbstractModule.h"
+
+namespace blink {
+
+class Application;
+
+class Module : public AbstractModule {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static PassRefPtr<Module> create(ExecutionContext* context, Application* application, Document* document, const String& url)
+ {
+ return adoptRef(new Module(context, application, document, url));
+ }
+
+ virtual ~Module();
+
+ Application* application() const { return m_application; }
+
+ void setExports(ScriptValue exports) { m_exports = exports; }
+ ScriptValue exports() const { return m_exports; }
+
+private:
+ Module(ExecutionContext* context, Application* application, Document* document, const String& url);
+ const AtomicString& interfaceName() const override;
+
+ Application* m_application;
eseidel 2014/11/10 22:02:00 I really wish we could life-time pointers. Either
abarth-chromium 2014/11/10 22:14:21 I made this into a RefPtr. It's going to be more
+ ScriptValue m_exports;
+};
+
+} // namespace blink
+
+#endif // SKY_ENGINE_CORE_APP_MODULE_H_

Powered by Google App Engine
This is Rietveld 408576698