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

Side by Side Diff: mojo/dart/embedder/builtin.h

Issue 950063002: Add patch file support to Dart embedder (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_DART_EMBEDDER_BUILTIN_H_ 5 #ifndef MOJO_DART_EMBEDDER_BUILTIN_H_
6 #define MOJO_DART_EMBEDDER_BUILTIN_H_ 6 #define MOJO_DART_EMBEDDER_BUILTIN_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 static Dart_Handle NewError(const char* format, ...); 50 static Dart_Handle NewError(const char* format, ...);
51 51
52 private: 52 private:
53 // Native method support. 53 // Native method support.
54 static Dart_NativeFunction NativeLookup(Dart_Handle name, 54 static Dart_NativeFunction NativeLookup(Dart_Handle name,
55 int argument_count, 55 int argument_count,
56 bool* auto_setup_scope); 56 bool* auto_setup_scope);
57 57
58 static const uint8_t* NativeSymbol(Dart_NativeFunction nf); 58 static const uint8_t* NativeSymbol(Dart_NativeFunction nf);
59 59 static Dart_Handle ReadStringFromFile(const char* file);
60 static void LoadPatchFiles(Dart_Handle library,
61 const char* patch_uri,
62 const char** patch_files);
60 typedef struct { 63 typedef struct {
61 const char* url_; 64 const char* url_;
62 bool has_natives_; 65 bool has_natives_;
63 Dart_NativeEntrySymbol native_symbol_; 66 Dart_NativeEntrySymbol native_symbol_;
64 Dart_NativeEntryResolver native_resolver_; 67 Dart_NativeEntryResolver native_resolver_;
68 const char* patch_url_;
69 const char** patch_paths_;
65 } builtin_lib_props; 70 } builtin_lib_props;
66 static builtin_lib_props builtin_libraries_[]; 71 static builtin_lib_props builtin_libraries_[];
67 72
73 static const char* mojo_core_patch_paths_[];
68 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin); 74 DISALLOW_IMPLICIT_CONSTRUCTORS(Builtin);
69 }; 75 };
70 76
71 } // namespace dart 77 } // namespace dart
72 } // namespace mojo 78 } // namespace mojo
73 79
74 #endif // MOJO_DART_EMBEDDER_BUILTIN_H_ 80 #endif // MOJO_DART_EMBEDDER_BUILTIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698