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 bool StartProvider(bool high_accuracy) override;
30 void StopProvider() override;
31 void GetPosition(content::Geoposition* position) override;
32 void RequestRefresh() override;
33 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_