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

Unified Diff: public/platform/WebScheduler.h

Issue 364873002: Introduce a basic Blink Scheduler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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
« Source/platform/ThreadTimers.cpp ('K') | « public/platform/Platform.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebScheduler.h
diff --git a/Source/web/StorageQuotaClientImpl.h b/public/platform/WebScheduler.h
similarity index 55%
copy from Source/web/StorageQuotaClientImpl.h
copy to public/platform/WebScheduler.h
index 9c8c2e7a8658eed3c9d19854770d8fc76652e055..b926ef369827720809cc5cb6c38b1481b882400f 100644
--- a/Source/web/StorageQuotaClientImpl.h
+++ b/public/platform/WebScheduler.h
@@ -28,30 +28,48 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef StorageQuotaClientImpl_h
-#define StorageQuotaClientImpl_h
+#ifndef WebScheduler_h
+#define WebScheduler_h
-#include "modules/quota/StorageQuotaClient.h"
-#include "wtf/Forward.h"
+#include "WebThread.h"
+
+namespace WebCore {
+class Scheduler;
+}
namespace blink {
-class StorageQuotaClientImpl : public NoBaseWillBeGarbageCollectedFinalized<StorageQuotaClientImpl>, public WebCore::StorageQuotaClient {
- WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(StorageQuotaClientImpl);
+class WebScheduler {
public:
- static PassOwnPtrWillBeRawPtr<StorageQuotaClientImpl> create();
+ BLINK_PLATFORM_EXPORT ~WebScheduler();
+
+ BLINK_PLATFORM_EXPORT static WebScheduler create();
- virtual ~StorageQuotaClientImpl();
+ // Schedule a generic task to be run on the blink main thread. Takes
+ // ownership of |Task|. Can be called from any thread.
+ BLINK_PLATFORM_EXPORT void postTask(WebThread::Task*);
- virtual void requestQuota(WebCore::ExecutionContext*, WebStorageQuotaType, unsigned long long newQuotaInBytes, PassOwnPtr<WebCore::StorageQuotaCallback>, PassOwnPtr<WebCore::StorageErrorCallback>) OVERRIDE;
- virtual WebCore::ScriptPromise requestPersistentQuota(WebCore::ScriptState*, unsigned long long newQuotaInBytes) OVERRIDE;
+ // Schedule an input processing task to be run on the blink main thread.
+ // Takes ownership of |Task|. Can be called from any thread.
+ BLINK_PLATFORM_EXPORT void postInputTask(WebThread::Task*);
- virtual void trace(WebCore::Visitor* visitor) OVERRIDE { WebCore::StorageQuotaClient::trace(visitor); }
+ // Schedule a compositor task to run on the blink main thread. Takes
+ // ownership of |Task|. Can be called from any thread.
+ // TODO: Use WebFrameTime.
+ BLINK_PLATFORM_EXPORT void postCompositorTask(WebThread::Task*);
+
+ // Schedule a BeginFrame task to run on the blink main thread. Takes
+ // ownership of |Task|. Can be called from any thread. Will maintain
+ // oredering with other compositor tasks.
+ // TODO: Use WebFrameTime.
+ BLINK_PLATFORM_EXPORT void postBeginFrameTask(WebThread::Task*, double frameTime, double deadline, double interval);
mithro-old 2014/07/08 10:38:11 If I understand correctly (which I'm never sure wi
private:
- StorageQuotaClientImpl();
+ WebScheduler();
+
+ WebCore::Scheduler* m_scheduler;
};
} // namespace blink
-#endif // StorageQuotaClientImpl_h
+#endif // WebScheduler_h
« Source/platform/ThreadTimers.cpp ('K') | « public/platform/Platform.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698