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

Side by Side Diff: blimp/engine/feature/geolocation/engine_geolocation_feature.cc

Issue 2226143002: Gets rid of the LocationArbitrator interface, in preference for LocationProvider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: In response to Wez's #73-75 comments. Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h" 5 #include "blimp/engine/feature/geolocation/engine_geolocation_feature.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 CreateBlimpMessage(&geolocation_message); 130 CreateBlimpMessage(&geolocation_message);
131 131
132 GeolocationSetInterestLevelMessage* geolocation_interest = 132 GeolocationSetInterestLevelMessage* geolocation_interest =
133 geolocation_message->mutable_set_interest_level(); 133 geolocation_message->mutable_set_interest_level();
134 geolocation_interest->set_level(level); 134 geolocation_interest->set_level(level);
135 135
136 outgoing_message_processor_->ProcessMessage(std::move(blimp_message), 136 outgoing_message_processor_->ProcessMessage(std::move(blimp_message),
137 net::CompletionCallback()); 137 net::CompletionCallback());
138 } 138 }
139 139
140 void EngineGeolocationFeature::RequestRefresh() { 140 void EngineGeolocationFeature::OnPermissionGranted() {
141 GeolocationMessage* geolocation_message = nullptr; 141 GeolocationMessage* geolocation_message = nullptr;
142 std::unique_ptr<BlimpMessage> blimp_message = 142 std::unique_ptr<BlimpMessage> blimp_message =
143 CreateBlimpMessage(&geolocation_message); 143 CreateBlimpMessage(&geolocation_message);
144 144
145 geolocation_message->mutable_request_refresh(); 145 geolocation_message->mutable_request_refresh();
146 146
147 outgoing_message_processor_->ProcessMessage(std::move(blimp_message), 147 outgoing_message_processor_->ProcessMessage(std::move(blimp_message),
148 net::CompletionCallback()); 148 net::CompletionCallback());
149 } 149 }
150 150
151 void EngineGeolocationFeature::SetUpdateCallback( 151 void EngineGeolocationFeature::SetUpdateCallback(
152 const GeopositionReceivedCallback& callback) { 152 const GeopositionReceivedCallback& callback) {
153 geoposition_received_callback_ = callback; 153 geoposition_received_callback_ = callback;
154 } 154 }
155 155
156 } // namespace engine 156 } // namespace engine
157 } // namespace blimp 157 } // namespace blimp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698