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

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

Issue 2801173004: Add '.mojom' suffix for battery mojom modules. (Closed)
Patch Set: Rebase only Created 3 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 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"
(...skipping 12 matching lines...) Expand all
23 static BatteryDispatcher& instance(); 23 static BatteryDispatcher& instance();
24 24
25 const BatteryStatus* latestData() const { 25 const BatteryStatus* latestData() const {
26 return m_hasLatestData ? &m_batteryStatus : nullptr; 26 return m_hasLatestData ? &m_batteryStatus : nullptr;
27 } 27 }
28 28
29 private: 29 private:
30 BatteryDispatcher(); 30 BatteryDispatcher();
31 31
32 void queryNextStatus(); 32 void queryNextStatus();
33 void onDidChange(device::blink::BatteryStatusPtr); 33 void onDidChange(device::mojom::blink::BatteryStatusPtr);
34 void updateBatteryStatus(const BatteryStatus&); 34 void updateBatteryStatus(const BatteryStatus&);
35 35
36 // Inherited from PlatformEventDispatcher. 36 // Inherited from PlatformEventDispatcher.
37 void startListening() override; 37 void startListening() override;
38 void stopListening() override; 38 void stopListening() override;
39 39
40 device::blink::BatteryMonitorPtr m_monitor; 40 device::mojom::blink::BatteryMonitorPtr m_monitor;
41 BatteryStatus m_batteryStatus; 41 BatteryStatus m_batteryStatus;
42 bool m_hasLatestData; 42 bool m_hasLatestData;
43 }; 43 };
44 44
45 } // namespace blink 45 } // namespace blink
46 46
47 #endif // BatteryDispatcher_h 47 #endif // BatteryDispatcher_h
OLDNEW
« no previous file with comments | « services/device/manifest.json ('k') | third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698