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

Side by Side Diff: runtime/bin/extensions.h

Issue 9465004: Add native extensions for the Dart shell to mac and windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add MacOS implementation, refactor and create extensions.cc Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_EXTENSIONS_H_ 5 #ifndef BIN_EXTENSIONS_H_
6 #define BIN_EXTENSIONS_H_ 6 #define BIN_EXTENSIONS_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/globals.h" 9 #include "platform/globals.h"
10 10
11 class Extensions { 11 class Extensions {
12 public: 12 public:
13 // TODO(whesse): Make loading extensions lazy, so dynamic library is loaded
14 // only when first native function is called.
15 // TODO(whesse): Make extension load from a relative path relative to 13 // TODO(whesse): Make extension load from a relative path relative to
16 // the library it is in. Currently loads from current working directory. 14 // the library it is in. Currently loads from current working directory.
17 static Dart_Handle LoadExtension(const char* extension_url, 15 static Dart_Handle LoadExtension(const char* extension_url,
18 Dart_Handle library); 16 Dart_Handle library);
Ivan Posva 2012/03/07 19:06:23 library -> parent_library Without any documentatio
Bill Hesse 2012/03/08 12:04:37 Done.
17 static char* MakeString(const char* format, const char* name);
Mads Ager (google) 2012/03/07 14:31:48 This one should not be exposed in the Extensions c
Bill Hesse 2012/03/08 12:04:37 It is used in both the platform-specific and platf
18
19 // Platform-specific implementations.
20 static void* LoadExtensionLibrary(const char* library_name);
Mads Ager (google) 2012/03/07 14:31:48 Could these two be private?
Bill Hesse 2012/03/08 12:04:37 Yes.
21 static void* ResolveSymbol(void* lib_handle, const char* symbol);
22
19 private: 23 private:
20 DISALLOW_ALLOCATION(); 24 DISALLOW_ALLOCATION();
21 DISALLOW_IMPLICIT_CONSTRUCTORS(Extensions); 25 DISALLOW_IMPLICIT_CONSTRUCTORS(Extensions);
22 }; 26 };
23 27
24 #endif // BIN_EXTENSIONS_H_ 28 #endif // BIN_EXTENSIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698