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

Side by Side Diff: runtime/embedders/openglui/android/main.cc

Issue 12340036: Android improvements: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | 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 #include "embedders/openglui/android/android_graphics_handler.h" 5 #include "embedders/openglui/android/android_graphics_handler.h"
6 #include "embedders/openglui/android/android_input_handler.h" 6 #include "embedders/openglui/android/android_input_handler.h"
7 #include "embedders/openglui/android/android_sound_handler.h" 7 #include "embedders/openglui/android/android_sound_handler.h"
8 #include "embedders/openglui/android/eventloop.h" 8 #include "embedders/openglui/android/eventloop.h"
9 #include "embedders/openglui/common/context.h" 9 #include "embedders/openglui/common/context.h"
10 #include "embedders/openglui/common/dart_host.h" 10 #include "embedders/openglui/common/dart_host.h"
11 #include "embedders/openglui/common/vm_glue.h" 11 #include "embedders/openglui/common/vm_glue.h"
12 12
13 void android_main(android_app* application) { 13 void android_main(android_app* application) {
14 app_dummy(); // Link in native_app_glue. 14 app_dummy(); // Link in native_app_glue.
15 AndroidGraphicsHandler graphics_handler(application); 15 const char* resource_path = "/data/data/com.google.dartndk/app_dart";
vsm 2013/02/23 00:25:25 Is it really "/data/data" at the top? Just looks
16 VMGlue vm_glue(&graphics_handler, "/data/data/com.google.dartndk/app_dart"); 16 AndroidGraphicsHandler graphics_handler(application, resource_path);
17 VMGlue vm_glue(&graphics_handler, resource_path);
17 AndroidInputHandler input_handler(&vm_glue, &graphics_handler); 18 AndroidInputHandler input_handler(&vm_glue, &graphics_handler);
18 AndroidSoundHandler sound_handler(application); 19 AndroidSoundHandler sound_handler(application);
19 Timer timer; 20 Timer timer;
20 Context app_context; 21 Context app_context;
21 app_context.graphics_handler = &graphics_handler; 22 app_context.graphics_handler = &graphics_handler;
22 app_context.input_handler = &input_handler; 23 app_context.input_handler = &input_handler;
23 app_context.sound_handler = &sound_handler; 24 app_context.sound_handler = &sound_handler;
24 app_context.timer = &timer; 25 app_context.timer = &timer;
25 app_context.vm_glue = &vm_glue; 26 app_context.vm_glue = &vm_glue;
26 EventLoop eventLoop(application); 27 EventLoop eventLoop(application);
27 DartHost host(&app_context); 28 DartHost host(&app_context);
28 eventLoop.Run(&host, &input_handler); 29 eventLoop.Run(&host, &input_handler);
29 } 30 }
30 31
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698