| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |