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 #ifndef XWALK_RUNTIME_BROWSER_GEOLOCATION_TIZEN_LOCATION_PROVIDER_TIZEN_H_
6 #define XWALK_RUNTIME_BROWSER_GEOLOCATION_TIZEN_LOCATION_PROVIDER_TIZEN_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "content/browser/geolocation/location_provider_base.h"
23 class LocationProviderTizen : public content::LocationProviderBase {
25 LocationProviderTizen();
26 virtual ~LocationProviderTizen();
29 virtual bool StartProvider(bool high_accuracy) OVERRIDE;
30 virtual void StopProvider() OVERRIDE;
31 virtual void GetPosition(content::Geoposition* position) OVERRIDE;
32 virtual void RequestRefresh() OVERRIDE;
33 virtual void OnPermissionGranted() OVERRIDE;
36 bool InitLocationManager();
37 void NotifyLocationProvider();
38 static void OnStateChanged(location_service_state_e state, void *data);
41 location_manager_h manager_;
42 content::Geoposition last_position_;
43 base::MessageLoop* geolocation_message_loop_;
44 bool is_permission_granted_;
45 DISALLOW_COPY_AND_ASSIGN(LocationProviderTizen);
50 #endif // XWALK_RUNTIME_BROWSER_GEOLOCATION_TIZEN_LOCATION_PROVIDER_TIZEN_H_