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

Unified Diff: runtime/embedders/openglui/common/vm_glue.h

Issue 13042015: Various OpenGLUI changes: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: runtime/embedders/openglui/common/vm_glue.h
===================================================================
--- runtime/embedders/openglui/common/vm_glue.h (revision 20570)
+++ runtime/embedders/openglui/common/vm_glue.h (working copy)
@@ -32,6 +32,15 @@
int OnKeyEvent(const char* funtion, int64_t when, int32_t key_code,
bool isAltKeyDown, bool isCtrlKeyDown, bool isShiftKeyDown,
int32_t repeat);
+ inline void OnAccelerometerEvent(float x, float y, float z) {
+ if (x != x_ || y != y_ || z != z_) {
+ x_ = x;
+ y_ = y;
+ z_ = z;
+ accelerometer_changed_ = true;
+ }
+ }
+
void FinishMainIsolate();
private:
@@ -54,11 +63,13 @@
static void ShutdownIsolate(void* callback_data);
static bool initialized_vm_;
+ static char* extension_script_;
ISized* surface_;
Dart_Isolate isolate_;
bool initialized_script_;
char* main_script_;
- static char* extension_script_;
+ float x_, y_, z_; // Last values from accelerometer.
+ bool accelerometer_changed_;
};
#endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_

Powered by Google App Engine
This is Rietveld 408576698