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

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

Issue 1740843002: Revert of Migrates battery_status from content/renderer/ to WebKit/platform/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_dispatcher_proxy.h
diff --git a/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.h b/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.h
deleted file mode 100644
index fc84f334854d13208d9f71127a44ef61ccae40af..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/platform/battery/battery_dispatcher_proxy.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef BLINK_PLATFORM_BATTERY_BATTERY_DISPATCHER_PROXY_H_
-#define BLINK_PLATFORM_BATTERY_BATTERY_DISPATCHER_PROXY_H_
-
-#include "device/battery/battery_monitor.mojom.h"
-#include "platform/PlatformExport.h"
-#include "wtf/Noncopyable.h"
-
-namespace blink {
-
-class BatteryStatus;
-
-// This class connects a BatteryDispatcherProxy::Listener to the underlying Mojo
-// service. Note that currently the access to the Mojo service is limited in
-// platform/. In future, we'll let classes in core/ and modules/ directly
-// communicate with Mojo, and then, there will be no need to use this proxy
-// class.
-//
-// TODO(yukishiino): Remove this class once Mojo supports WTF-types.
-class PLATFORM_EXPORT BatteryDispatcherProxy {
- WTF_MAKE_NONCOPYABLE(BatteryDispatcherProxy);
- public:
- class PLATFORM_EXPORT Listener {
- public:
- virtual ~Listener() = default;
-
- // This method is called when a new battery status is available.
- virtual void OnUpdateBatteryStatus(const BatteryStatus&) = 0;
- };
-
- explicit BatteryDispatcherProxy(Listener*);
- ~BatteryDispatcherProxy();
-
- void StartListening();
- void StopListening();
-
- private:
- void QueryNextStatus();
- void OnDidChange(device::BatteryStatusPtr);
-
- device::BatteryMonitorPtr monitor_;
- Listener* listener_;
-
- friend class BatteryDispatcherProxyTest;
-};
-
-} // namespace blink
-
-#endif // BLINK_PLATFORM_BATTERY_BATTERY_DISPATCHER_PROXY_H_

Powered by Google App Engine
This is Rietveld 408576698