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

Unified Diff: runtime/bin/extensions.h

Issue 9430051: Add native extensions to the Dart shell, on the linux platform. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Windows bugs Created 8 years, 10 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 | « runtime/bin/dartutils.cc ('k') | runtime/bin/extensions_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/extensions.h
diff --git a/runtime/bin/extensions.h b/runtime/bin/extensions.h
new file mode 100644
index 0000000000000000000000000000000000000000..fda8f1e4d41754e1f9591496fdd7d55f262b33ac
--- /dev/null
+++ b/runtime/bin/extensions.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef BIN_EXTENSIONS_H_
+#define BIN_EXTENSIONS_H_
+
+#include "include/dart_api.h"
+#include "platform/globals.h"
+
+class Extensions {
+ public:
+ // TODO(whesse): Make loading extensions lazy, so dynamic library is loaded
+ // only when first native function is called.
+ // TODO(whesse): Make extension load from a relative path relative to
+ // the library it is in. Currently loads from current working directory.
+ static Dart_Handle LoadExtension(const char* extension_url,
+ Dart_Handle library);
+ private:
+ DISALLOW_ALLOCATION();
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Extensions);
+};
+
+#endif // BIN_EXTENSIONS_H_
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/extensions_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698