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

Unified Diff: sky/engine/bindings/builtin.h

Issue 956653003: Dart: Moves |native| methods to patch files. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Adjust analyzer script Created 5 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 | « sky/engine/bindings/BUILD.gn ('k') | sky/engine/bindings/builtin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/builtin.h
diff --git a/sky/engine/bindings/builtin.h b/sky/engine/bindings/builtin.h
index d1c829bdf4e34124bcafcf1a9c81541cf00d0b1e..c4f0c909d9e7770107cc4cc523ca54ee27db6d55 100644
--- a/sky/engine/bindings/builtin.h
+++ b/sky/engine/bindings/builtin.h
@@ -22,10 +22,21 @@ class Builtin {
kInvalidLibrary,
};
- static void SetNativeResolver(BuiltinLibraryId id);
- static Dart_Handle LoadAndCheckLibrary(BuiltinLibraryId id);
+ // Return the library specified in 'id'.
+ static Dart_Handle GetLibrary(BuiltinLibraryId id);
+
+ // Prepare the library specified in 'id'. Preparation includes:
+ // 1) Setting the native resolver (if any).
+ // 2) Applying patch files (if any).
+ // NOTE: This should only be called once for a library per isolate.
+ static void PrepareLibrary(BuiltinLibraryId id);
private:
+ static int FindResource(const char* path, const uint8_t** resource);
+ static Dart_Handle GetStringResource(const char* resource_name);
+ static void LoadPatchFiles(Dart_Handle library,
+ const char* patch_uri,
+ const char** patch_files);
DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin);
};
« no previous file with comments | « sky/engine/bindings/BUILD.gn ('k') | sky/engine/bindings/builtin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698