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

Unified Diff: Source/core/frame/DeviceEventControllerBase.h

Issue 417213002: Introduce PlatformEvent to handle Device events, Battery events and Gamepad events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 4 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
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/frame/DeviceEventControllerBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/DeviceEventControllerBase.h
diff --git a/Source/core/frame/DeviceEventControllerBase.h b/Source/core/frame/DeviceEventControllerBase.h
deleted file mode 100644
index 049b238efc0b321e642e64a9a8c94be59242ea6e..0000000000000000000000000000000000000000
--- a/Source/core/frame/DeviceEventControllerBase.h
+++ /dev/null
@@ -1,50 +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 DeviceEventControllerBase_h
-#define DeviceEventControllerBase_h
-
-#include "core/page/PageLifecycleObserver.h"
-#include "platform/Timer.h"
-#include "platform/heap/Handle.h"
-
-namespace blink {
-
-// Base controller class for registering controllers with a dispatcher.
-// It watches page visibility and calls stopUpdating when page is not visible.
-// It provides a didUpdateData() callback method which is called when new data
-// it available.
-class DeviceEventControllerBase : public PageLifecycleObserver {
-public:
- void startUpdating();
- void stopUpdating();
-
- // This is called when new data becomes available.
- virtual void didUpdateData() = 0;
-
-protected:
- explicit DeviceEventControllerBase(Page*);
- virtual ~DeviceEventControllerBase();
-
- virtual void registerWithDispatcher() = 0;
- virtual void unregisterWithDispatcher() = 0;
-
- // When true initiates a one-shot didUpdateData() when startUpdating() is called.
- virtual bool hasLastData() = 0;
-
- bool m_hasEventListener;
-
-private:
- // Inherited from PageLifecycleObserver.
- virtual void pageVisibilityChanged() OVERRIDE;
-
- void oneShotCallback(Timer<DeviceEventControllerBase>*);
-
- bool m_isActive;
- Timer<DeviceEventControllerBase> m_timer;
-};
-
-} // namespace blink
-
-#endif // DeviceEventControllerBase_h
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/frame/DeviceEventControllerBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698