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

Side by Side Diff: samples/android_sample/jni/vm_glue.h

Issue 11467028: Migrate files to embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review fixes Created 7 years, 11 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
« no previous file with comments | « samples/android_sample/jni/types.h ('k') | samples/android_sample/jni/vm_glue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef VM_GLUE_H
6 #define VM_GLUE_H
7
8 #include <android_native_app_glue.h>
9
10 #include "include/dart_api.h"
11 #include "jni/graphics.h"
12
13 class VMGlue {
14 public:
15 explicit VMGlue(Graphics* graphics);
16
17 int InitializeVM();
18 int StartMainIsolate();
19 int CallSetup();
20 int CallUpdate();
21 int OnMotionEvent(const char* function, int64_t when,
22 float move_x, float move_y);
23 int OnKeyEvent(const char* function, int64_t when, int32_t flags,
24 int32_t key_code, int32_t meta_state, int32_t repeat);
25 void FinishMainIsolate();
26
27 private:
28 int Invoke(const char *function, int argc, Dart_Handle* args);
29
30 static int ErrorExit(const char* format, ...);
31 static Dart_Handle CheckError(Dart_Handle);
32
33 static bool CreateIsolateAndSetupHelper(const char* script_uri,
34 const char* main,
35 void* data,
36 char** error);
37 static bool CreateIsolateAndSetup(const char* script_uri,
38 const char* main,
39 void* data, char** error);
40 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
41 Dart_Handle library,
42 Dart_Handle urlHandle);
43 static Dart_Handle LoadSourceFromFile(const char* url);
44 static void ShutdownIsolate(void* callback_data);
45
46 Graphics* graphics_;
47 Dart_Isolate isolate_;
48 bool initialized_vm_;
49 bool initialized_script_;
50 };
51
52 #endif
53
OLDNEW
« no previous file with comments | « samples/android_sample/jni/types.h ('k') | samples/android_sample/jni/vm_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698