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

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

Issue 2328453003: Makes use of EngineGeolocationFeature weak_ptr threadsafe. (Closed)
Patch Set: Get rid of ui/gl/BUILD.gn change Created 4 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 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 #ifndef BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_ 5 #ifndef BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_
6 #define BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_ 6 #define BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 25 matching lines...) Expand all
36 void ProcessMessage(std::unique_ptr<BlimpMessage> message, 36 void ProcessMessage(std::unique_ptr<BlimpMessage> message,
37 const net::CompletionCallback& callback) override; 37 const net::CompletionCallback& callback) override;
38 38
39 private: 39 private:
40 void NotifyCallback(const device::Geoposition& position); 40 void NotifyCallback(const device::Geoposition& position);
41 41
42 // BlimpLocationProvider::Delegate implementation. 42 // BlimpLocationProvider::Delegate implementation.
43 void RequestAccuracy( 43 void RequestAccuracy(
44 GeolocationSetInterestLevelMessage::Level level) override; 44 GeolocationSetInterestLevelMessage::Level level) override;
45 void OnPermissionGranted() override; 45 void OnPermissionGranted() override;
46 void SetUpdateCallback(const GeopositionReceivedCallback& callback) override; 46 void SetUpdateCallback(
47 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
48 const GeopositionReceivedCallback& callback) override;
47 49
48 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; 50 std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_;
49 GeopositionReceivedCallback geoposition_received_callback_; 51 GeopositionReceivedCallback geoposition_received_callback_;
50 scoped_refptr<base::SingleThreadTaskRunner> callback_task_runner_; 52 scoped_refptr<base::SingleThreadTaskRunner> callback_task_runner_;
51 base::WeakPtrFactory<EngineGeolocationFeature> weak_factory_; 53 base::WeakPtrFactory<EngineGeolocationFeature> weak_factory_;
52 54
53 DISALLOW_COPY_AND_ASSIGN(EngineGeolocationFeature); 55 DISALLOW_COPY_AND_ASSIGN(EngineGeolocationFeature);
54 }; 56 };
55 57
56 } // namespace engine 58 } // namespace engine
57 } // namespace blimp 59 } // namespace blimp
58 60
59 #endif // BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_ 61 #endif // BLIMP_ENGINE_FEATURE_GEOLOCATION_ENGINE_GEOLOCATION_FEATURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698