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

Unified Diff: blimp/common/proto/geolocation.proto

Issue 2091023006: Adds EngineGeolocationFeature for Blimp Geolocation project. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: In response to Wez's #23 comment Created 4 years, 5 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: blimp/common/proto/geolocation.proto
diff --git a/blimp/common/proto/geolocation.proto b/blimp/common/proto/geolocation.proto
new file mode 100644
index 0000000000000000000000000000000000000000..a8acd221dac3419bb6725b217c0da391d6f4aa76
--- /dev/null
+++ b/blimp/common/proto/geolocation.proto
@@ -0,0 +1,68 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Message definitions for geolocation messages.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+import "common.proto";
+
+package blimp;
+
+message GeolocationErrorMessage {
+ enum ErrorCode {
+ PERMISSION_DENIED = 1;
+ POSITION_UNAVAILABLE = 2;
+ TIMEOUT = 3;
+ }
+
+ optional ErrorCode error_code = 1;
+ optional string error_message = 2;
+}
+
+message GeolocationCoordinates {
+ optional double latitude = 1;
+ optional double longitude = 2;
+ optional double altitude = 3;
+ optional double accuracy = 4;
+ optional double altitude_accuracy = 5;
+ optional double heading = 6;
+ optional double speed = 7;
+}
+
+message GeolocationPositionMessage {
+ optional GeolocationCoordinates coordinates = 1;
+
+ // Client-side time
Wez 2016/07/14 01:19:21 If you check the LocationProvider interface you'll
CJ 2016/07/14 23:55:09 Ah okay! Did not know that. Updating.
Wez 2016/07/15 01:46:17 Acknowledged.
+ optional int64 timestamp_millis = 2;
+}
+
+message GeolocationInterestMessage {
+ // These values represent the various listening states the server can have.
+ // A ListenState containing an accuracy level indicates that the server is
+ // waiting for either high or low accuracy position updates from the client.
+ // If a REQUEST_NONE listen state is sent, the server is no longer listening
+ // for updates.
Wez 2016/07/14 01:19:21 My suggestion was to rename ListenState and the en
CJ 2016/07/14 23:55:09 Done, but slightly different. Thought NO_INTEREST
Wez 2016/07/15 01:46:17 Acknowledged.
+ enum ListenState {
+ REQUEST_NONE = 0;
+ ACCURACY_HIGH = 1;
+ ACCURACY_LOW = 2;
+ }
+
+ optional ListenState listen_state = 1;
+}
+
+message GeolocationMessage {
+ oneof type {
+ // Server => Client types.
+ GeolocationInterestMessage update_listen_state = 1;
+ EmptyMessage request_refresh = 2;
+
+ // Client => Server types.
+ GeolocationPositionMessage location = 3;
+ GeolocationErrorMessage error = 4;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698