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

Unified Diff: sky/engine/core/frame/PlatformEventController.h

Issue 870413002: Remove PlatformEvent (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 | « sky/engine/core/frame/NewEventHandler.cpp ('k') | sky/engine/core/frame/PlatformEventController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/frame/PlatformEventController.h
diff --git a/sky/engine/core/frame/PlatformEventController.h b/sky/engine/core/frame/PlatformEventController.h
deleted file mode 100644
index 3e4068901e170cfd689bff661d6ebbd620292a32..0000000000000000000000000000000000000000
--- a/sky/engine/core/frame/PlatformEventController.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 SKY_ENGINE_CORE_FRAME_PLATFORMEVENTCONTROLLER_H_
-#define SKY_ENGINE_CORE_FRAME_PLATFORMEVENTCONTROLLER_H_
-
-#include "sky/engine/core/page/PageLifecycleObserver.h"
-#include "sky/engine/platform/Timer.h"
-#include "sky/engine/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 PlatformEventController : public PageLifecycleObserver {
-public:
- void startUpdating();
- void stopUpdating();
-
- // This is called when new data becomes available.
- virtual void didUpdateData() = 0;
-
-protected:
- explicit PlatformEventController(Page*);
- virtual ~PlatformEventController();
-
- 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<PlatformEventController>*);
-
- bool m_isActive;
- Timer<PlatformEventController> m_timer;
-};
-
-} // namespace blink
-
-#endif // SKY_ENGINE_CORE_FRAME_PLATFORMEVENTCONTROLLER_H_
« no previous file with comments | « sky/engine/core/frame/NewEventHandler.cpp ('k') | sky/engine/core/frame/PlatformEventController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698