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

Unified Diff: third_party/WebKit/Source/platform/battery/battery_status_listener.h

Issue 1538803002: Migrates battery_status from content/renderer/ to WebKit/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BatteryStatusDispatcher => BatteryDispatcherProxy Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/battery/battery_status_listener.h
diff --git a/third_party/WebKit/Source/platform/PlatformResourceLoader.h b/third_party/WebKit/Source/platform/battery/battery_status_listener.h
similarity index 33%
copy from third_party/WebKit/Source/platform/PlatformResourceLoader.h
copy to third_party/WebKit/Source/platform/battery/battery_status_listener.h
index e2db013c6374320729c668ddc9cee5f5f198294f..8ba0d967df0a7ce17d120d8e14775ff210b41594 100644
--- a/third_party/WebKit/Source/platform/PlatformResourceLoader.h
+++ b/third_party/WebKit/Source/platform/battery/battery_status_listener.h
@@ -2,16 +2,23 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef PlatformResourceLoader_h
-#define PlatformResourceLoader_h
+#ifndef BLINK_PLATFORM_BATTERY_BATTERY_STATUS_LISTENER_H_
+#define BLINK_PLATFORM_BATTERY_BATTERY_STATUS_LISTENER_H_
#include "platform/PlatformExport.h"
-#include "wtf/text/WTFString.h"
namespace blink {
-PLATFORM_EXPORT String loadResourceAsASCIIString(const char* resource);
+class BatteryStatus;
-} // namespace blink
+class PLATFORM_EXPORT BatteryStatusListener {
kinuko 2016/02/16 10:09:18 I think it'd be probably make the structure cleare
Yuki 2016/02/16 13:21:59 Took an idea of BatteryDispatcherProxy::Listener.
+ public:
+ virtual ~BatteryStatusListener() = default;
-#endif // PlatformResourceLoader_h
+ // This method is called when a new battery status is available.
+ virtual void OnUpdateBatteryStatus(const BatteryStatus&) = 0;
+};
+
+} // namespace blink
+
+#endif // BLINK_PLATFORM_BATTERY_BATTERY_STATUS_LISTENER_H_

Powered by Google App Engine
This is Rietveld 408576698