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

Side by Side Diff: samples/android_sample/jni/main.cc

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/log.h ('k') | samples/android_sample/jni/resource.h » ('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 #include "jni/context.h"
2 #include "jni/dart_host.h"
3 #include "jni/eventloop.h"
4 #include "jni/graphics.h"
5 #include "jni/input_service.h"
6 #include "jni/vm_glue.h"
7
8 SoundService* psound_service;
9
10 void android_main(android_app* application) {
11 Timer timer;
12 Graphics graphics(application, &timer);
13 VMGlue vmGlue(&graphics);
14 InputService inputService(application, &vmGlue,
15 graphics.width(), graphics.height());
16 SoundService sound_service(application);
17 psound_service = &sound_service;
18 Context context;
19 context = { &graphics, &inputService, psound_service, &timer, &vmGlue };
20 EventLoop eventLoop(application);
21 DartHost host(&context);
22 eventLoop.Run(&host, &context);
23 }
24
25 void PlayBackground(const char* path) {
26 psound_service->PlayBackground(path);
27 }
28
29 void StopBackground() {
30 psound_service->StopBackground();
31 }
OLDNEW
« no previous file with comments | « samples/android_sample/jni/log.h ('k') | samples/android_sample/jni/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698