forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds EngineGeolocationFeature for Blimp Geolocation project.
This change provides the engine-side classes needed to receive and send geolocation messages from the client. EngineGeolocationFeature sends messages from the engine that can either indicate the client-side to start sending location messages of the specified accuracy, request a refresh of the location, or indicate that the engine side no longer is listening for updates. The EngineGeolocationFeature also receives messages from the client, which can either provide a location or indicate an error. Other changes: *Moves EmptyMessage out of tab_control.proto to common.proto BUG=614486 Review-Url: https://codereview.chromium.org/2091023006 Cr-Commit-Position: refs/heads/master@{#407934}
- Loading branch information
lethalantidote
authored and
Commit bot
committed
Jul 26, 2016
1 parent
997739a
commit 695c494
Showing
20 changed files
with
842 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// 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 shared across proto files. | ||
|
||
syntax = "proto2"; | ||
|
||
option optimize_for = LITE_RUNTIME; | ||
|
||
package blimp; | ||
|
||
message EmptyMessage {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// 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. | ||
|
||
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 GeolocationCoordinatesMessage { | ||
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 GeolocationSetInterestLevelMessage { | ||
// These values represent the various listening states the server can have. | ||
// A Level containing an accuracy level indicates that the server is | ||
// waiting for either high or low accuracy position updates from the client. | ||
// If a NO_INTEREST level is sent, the server is no longer listening | ||
// for updates. | ||
enum Level { | ||
NO_INTEREST = 0; | ||
HIGH_ACCURACY = 1; | ||
LOW_ACCURACY = 2; | ||
} | ||
|
||
optional Level level = 1; | ||
} | ||
|
||
message GeolocationMessage { | ||
oneof type { | ||
// Server => Client types. | ||
GeolocationSetInterestLevelMessage set_interest_level = 1; | ||
EmptyMessage request_refresh = 2; | ||
|
||
// Client => Server types. | ||
GeolocationCoordinatesMessage coordinates = 3; | ||
GeolocationErrorMessage error = 4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.