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

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

Issue 11467028: Migrate files to embedder. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge and lint 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
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 #include "embedders/android/context.h"
6 #include "embedders/android/dart_host.h"
7 #include "embedders/android/eventloop.h"
8 #include "embedders/android/graphics.h"
9 #include "embedders/android/input_service.h"
10 #include "embedders/android/vm_glue.h"
11
12 SoundService* psound_service;
13
14 void android_main(android_app* application) {
15 Timer timer;
16 Graphics graphics(application, &timer);
17 VMGlue vmGlue(&graphics);
18 InputService inputService(application, &vmGlue,
19 graphics.width(), graphics.height());
20 SoundService sound_service(application);
21 psound_service = &sound_service;
22 Context context;
23 context.graphics = &graphics;
24 context.input_handler = &inputService;
25 context.sound_service = psound_service;
26 context.timer = &timer;
27 context.vm_glue = &vmGlue;
28 EventLoop eventLoop(application);
29 DartHost host(&context);
30 eventLoop.Run(&host, &context);
31 }
32
33 void PlayBackground(const char* path) {
34 psound_service->PlayBackground(path);
35 }
36
37 void StopBackground() {
38 psound_service->StopBackground();
39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698