| OLD | NEW |
| (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 EMBEDDERS_OPENGLUI_COMMON_DART_HOST_H_ | |
| 6 #define EMBEDDERS_OPENGLUI_COMMON_DART_HOST_H_ | |
| 7 | |
| 8 #include "embedders/openglui/common/context.h" | |
| 9 #include "embedders/openglui/common/graphics_handler.h" | |
| 10 #include "embedders/openglui/common/input_handler.h" | |
| 11 #include "embedders/openglui/common/lifecycle_handler.h" | |
| 12 #include "embedders/openglui/common/sound_handler.h" | |
| 13 #include "embedders/openglui/common/timer.h" | |
| 14 #include "embedders/openglui/common/vm_glue.h" | |
| 15 #include "include/dart_api.h" | |
| 16 | |
| 17 class DartHost : public LifeCycleHandler { | |
| 18 public: | |
| 19 explicit DartHost(Context* context); | |
| 20 virtual ~DartHost(); | |
| 21 | |
| 22 int32_t OnStart(); | |
| 23 void OnSaveState(void** data, size_t* size); | |
| 24 void OnConfigurationChanged(); | |
| 25 void OnLowMemory(); | |
| 26 int32_t Activate(); | |
| 27 void Deactivate(); | |
| 28 void Pause(); | |
| 29 int32_t Resume(); | |
| 30 void FreeAllResources(); | |
| 31 int32_t OnStep(); | |
| 32 | |
| 33 private: | |
| 34 void Clear(); | |
| 35 | |
| 36 GraphicsHandler* graphics_handler_; | |
| 37 InputHandler* input_handler_; | |
| 38 SoundHandler* sound_handler_; | |
| 39 Timer* timer_; | |
| 40 VMGlue* vm_glue_; | |
| 41 bool has_context_; | |
| 42 bool started_; | |
| 43 bool active_; | |
| 44 }; | |
| 45 | |
| 46 #endif // EMBEDDERS_OPENGLUI_COMMON_DART_HOST_H_ | |
| 47 | |
| OLD | NEW |