1 // Copyright (c) 2013 Intel Corporation. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Part of codes are copied from libslp-sensor with original copyright
6 // and license as below.
8 // Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
10 // Licensed under the Apache License, Version 2.0 (the "License");
11 // you may not use this file except in compliance with the License.
12 // You may obtain a copy of the License at
14 // http://www.apache.org/licenses/LICENSE-2.0
16 #ifndef XWALK_TIZEN_MOBILE_SENSOR_TIZEN_PLATFORM_SENSOR_H_
17 #define XWALK_TIZEN_MOBILE_SENSOR_TIZEN_PLATFORM_SENSOR_H_
22 #include "base/native_library.h"
23 #include "xwalk/tizen/mobile/sensor/sensor_provider.h"
27 class TizenPlatformSensor : public SensorProvider {
29 TizenPlatformSensor();
30 virtual ~TizenPlatformSensor();
32 virtual bool Initialize() OVERRIDE;
33 virtual void Finish() OVERRIDE;
36 bool auto_rotation_enabled_;
40 static void OnEventReceived(unsigned int event_type,
41 sensor_event_data_t* event_data, void* udata);
42 static void OnAutoRotationEnabledChanged(keynode_t* node, void* udata);
44 DISALLOW_COPY_AND_ASSIGN(TizenPlatformSensor);
49 #endif // XWALK_TIZEN_MOBILE_SENSOR_TIZEN_PLATFORM_SENSOR_H_