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

Side by Side Diff: content/browser/geolocation/location_api_adapter_android.h

Issue 10392128: Upstream Geolocation timestamp fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/geolocation/location_api_adapter_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_GEOLOCATION_ANDROID_LOCATION_API_ADAPTER_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_ANDROID_LOCATION_API_ADAPTER_H_
6 #define CONTENT_BROWSER_GEOLOCATION_ANDROID_LOCATION_API_ADAPTER_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_ANDROID_LOCATION_API_ADAPTER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/android/scoped_java_ref.h" 9 #include "base/android/scoped_java_ref.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 // Returns our singleton. 43 // Returns our singleton.
44 static AndroidLocationApiAdapter* GetInstance(); 44 static AndroidLocationApiAdapter* GetInstance();
45 45
46 // Called when initializing chrome_view to obtain a pointer to the java class. 46 // Called when initializing chrome_view to obtain a pointer to the java class.
47 static bool RegisterGeolocationService(JNIEnv* env); 47 static bool RegisterGeolocationService(JNIEnv* env);
48 48
49 // Called by JNI on main thread looper. 49 // Called by JNI on main thread looper.
50 static void OnNewLocationAvailable(double latitude, 50 static void OnNewLocationAvailable(double latitude,
51 double longitude, 51 double longitude,
52 long time_stamp, 52 double time_stamp,
53 bool has_altitude, double altitude, 53 bool has_altitude, double altitude,
54 bool has_accuracy, double accuracy, 54 bool has_accuracy, double accuracy,
55 bool has_heading, double heading, 55 bool has_heading, double heading,
56 bool has_speed, double speed); 56 bool has_speed, double speed);
57 static void OnNewErrorAvailable(JNIEnv* env, jstring message); 57 static void OnNewErrorAvailable(JNIEnv* env, jstring message);
58 58
59 private: 59 private:
60 friend struct DefaultSingletonTraits<AndroidLocationApiAdapter>; 60 friend struct DefaultSingletonTraits<AndroidLocationApiAdapter>;
61 AndroidLocationApiAdapter(); 61 AndroidLocationApiAdapter();
62 ~AndroidLocationApiAdapter(); 62 ~AndroidLocationApiAdapter();
(...skipping 11 matching lines...) Expand all
74 java_location_provider_android_object_; 74 java_location_provider_android_object_;
75 LocationProviderAndroid* location_provider_; 75 LocationProviderAndroid* location_provider_;
76 76
77 // Guards against the following member which is accessed on Geolocation 77 // Guards against the following member which is accessed on Geolocation
78 // thread and the JNI main thread looper. 78 // thread and the JNI main thread looper.
79 base::Lock lock_; 79 base::Lock lock_;
80 scoped_refptr<base::MessageLoopProxy> message_loop_; 80 scoped_refptr<base::MessageLoopProxy> message_loop_;
81 }; 81 };
82 82
83 #endif // CONTENT_BROWSER_GEOLOCATION_ANDROID_LOCATION_API_ADAPTER_H_ 83 #endif // CONTENT_BROWSER_GEOLOCATION_ANDROID_LOCATION_API_ADAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/geolocation/location_api_adapter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698