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

Side by Side Diff: content/renderer/device_sensors/device_light_event_pump.h

Issue 1873783003: Convert //content/renderer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_ 5 #ifndef CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_ 6 #define CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "content/common/device_sensors/device_light_data.h" 11 #include "content/common/device_sensors/device_light_data.h"
11 #include "content/renderer/device_sensors/device_sensor_event_pump.h" 12 #include "content/renderer/device_sensors/device_sensor_event_pump.h"
12 #include "content/renderer/shared_memory_seqlock_reader.h" 13 #include "content/renderer/shared_memory_seqlock_reader.h"
13 14
14 namespace blink { 15 namespace blink {
15 class WebDeviceLightListener; 16 class WebDeviceLightListener;
16 } 17 }
17 18
18 namespace content { 19 namespace content {
19 20
(...skipping 19 matching lines...) Expand all
39 void FireEvent() override; 40 void FireEvent() override;
40 bool InitializeReader(base::SharedMemoryHandle handle) override; 41 bool InitializeReader(base::SharedMemoryHandle handle) override;
41 42
42 // PlatformEventObserver implementation. 43 // PlatformEventObserver implementation.
43 void SendStartMessage() override; 44 void SendStartMessage() override;
44 void SendStopMessage() override; 45 void SendStopMessage() override;
45 46
46 private: 47 private:
47 bool ShouldFireEvent(double data) const; 48 bool ShouldFireEvent(double data) const;
48 49
49 scoped_ptr<DeviceLightSharedMemoryReader> reader_; 50 std::unique_ptr<DeviceLightSharedMemoryReader> reader_;
50 double last_seen_data_; 51 double last_seen_data_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(DeviceLightEventPump); 53 DISALLOW_COPY_AND_ASSIGN(DeviceLightEventPump);
53 }; 54 };
54 55
55 } // namespace content 56 } // namespace content
56 57
57 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_ 58 #endif // CONTENT_RENDERER_DEVICE_SENSORS_DEVICE_LIGHT_EVENT_PUMP_H_
OLDNEW
« no previous file with comments | « content/renderer/child_frame_compositing_helper.h ('k') | content/renderer/device_sensors/device_light_event_pump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698