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

Unified Diff: services/location/src/org/chromium/services/location/LocationApplicationDelegate.java

Issue 1309233008: Move applications using play services to the shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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: services/location/src/org/chromium/services/location/LocationApplicationDelegate.java
diff --git a/services/location/src/org/chromium/services/location/LocationServiceApp.java b/services/location/src/org/chromium/services/location/LocationApplicationDelegate.java
similarity index 89%
rename from services/location/src/org/chromium/services/location/LocationServiceApp.java
rename to services/location/src/org/chromium/services/location/LocationApplicationDelegate.java
index f82608f664364737537efd02ba1066ac2577dda0..1f19f9dbfca7561ad55199859f1a80aaef4665d9 100644
--- a/services/location/src/org/chromium/services/location/LocationServiceApp.java
+++ b/services/location/src/org/chromium/services/location/LocationApplicationDelegate.java
@@ -14,19 +14,17 @@ import com.google.android.gms.location.LocationServices;
import org.chromium.mojo.application.ApplicationConnection;
import org.chromium.mojo.application.ApplicationDelegate;
-import org.chromium.mojo.application.ApplicationRunner;
import org.chromium.mojo.application.ServiceFactoryBinder;
import org.chromium.mojo.bindings.InterfaceRequest;
import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.MessagePipeHandle;
import org.chromium.mojom.mojo.LocationService;
import org.chromium.mojom.mojo.Shell;
/**
- * Android service application implementing the LocationService interface using Google play
- * services API.
+ * Android service application implementing the LocationService interface using Google play services
+ * API.
*/
-class LocationServiceApp implements ApplicationDelegate {
+public class LocationApplicationDelegate implements ApplicationDelegate {
private static final String TAG = "LocationServiceApp";
private final GoogleApiClient mGoogleApiClient;
@@ -74,9 +72,10 @@ class LocationServiceApp implements ApplicationDelegate {
mLooper.quitSafely();
}
}
+
private final LooperThread mLooperThread = new LooperThread();
- public LocationServiceApp(Context context, Core core) {
+ public LocationApplicationDelegate(Context context, Core core) {
// TODO(alhaad): Create a test mode which uses mock locations instead of real locations.
mGoogleApiClient =
new GoogleApiClient.Builder(context).addApi(LocationServices.API).build();
@@ -133,10 +132,4 @@ class LocationServiceApp implements ApplicationDelegate {
Log.e(TAG, e.getMessage(), e);
}
}
-
- public static void mojoMain(
- Context context, Core core, MessagePipeHandle applicationRequestHandle) {
- ApplicationRunner.run(
- new LocationServiceApp(context, core), core, applicationRequestHandle);
- }
}
« no previous file with comments | « services/location/BUILD.gn ('k') | services/location/src/org/chromium/services/location/LocationServiceApp.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698