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

Side by Side Diff: third_party/WebKit/Source/modules/battery/BatteryDispatcher.h

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 BatteryDispatcher_h 5 #ifndef BatteryDispatcher_h
6 #define BatteryDispatcher_h 6 #define BatteryDispatcher_h
7 7
8 #include "core/frame/PlatformEventDispatcher.h" 8 #include "core/frame/PlatformEventDispatcher.h"
9 #include "device/battery/battery_monitor.mojom-blink.h" 9 #include "device/battery/battery_monitor.mojom-blink.h"
10 #include "modules/ModulesExport.h" 10 #include "modules/ModulesExport.h"
11 #include "modules/battery/BatteryManager.h" 11 #include "modules/battery/BatteryManager.h"
12 #include "modules/battery/battery_status.h" 12 #include "modules/battery/battery_status.h"
13 #include "wtf/OwnPtr.h"
14 13
15 namespace blink { 14 namespace blink {
16 15
17 class MODULES_EXPORT BatteryDispatcher final : public GarbageCollectedFinalized< BatteryDispatcher>, public PlatformEventDispatcher { 16 class MODULES_EXPORT BatteryDispatcher final : public GarbageCollectedFinalized< BatteryDispatcher>, public PlatformEventDispatcher {
18 USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher); 17 USING_GARBAGE_COLLECTED_MIXIN(BatteryDispatcher);
19 WTF_MAKE_NONCOPYABLE(BatteryDispatcher); 18 WTF_MAKE_NONCOPYABLE(BatteryDispatcher);
20 public: 19 public:
21 static BatteryDispatcher& instance(); 20 static BatteryDispatcher& instance();
22 21
23 const BatteryStatus* latestData() const 22 const BatteryStatus* latestData() const
(...skipping 13 matching lines...) Expand all
37 void stopListening() override; 36 void stopListening() override;
38 37
39 device::blink::BatteryMonitorPtr m_monitor; 38 device::blink::BatteryMonitorPtr m_monitor;
40 BatteryStatus m_batteryStatus; 39 BatteryStatus m_batteryStatus;
41 bool m_hasLatestData; 40 bool m_hasLatestData;
42 }; 41 };
43 42
44 } // namespace blink 43 } // namespace blink
45 44
46 #endif // BatteryDispatcher_h 45 #endif // BatteryDispatcher_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698