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

Unified Diff: components/html_viewer/blink_platform_impl.h

Issue 1112573003: Hook up the scheduler component to html_viewer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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: components/html_viewer/blink_platform_impl.h
diff --git a/components/html_viewer/blink_platform_impl.h b/components/html_viewer/blink_platform_impl.h
index 3f9a803b805f7aee2777e30a01a66391a6edbd4e..e68de661f0276425f6abb0930ef56bf0c938eb86 100644
--- a/components/html_viewer/blink_platform_impl.h
+++ b/components/html_viewer/blink_platform_impl.h
@@ -14,13 +14,17 @@
#include "components/html_viewer/mock_web_blob_registry_impl.h"
#include "components/html_viewer/web_mime_registry_impl.h"
#include "components/html_viewer/web_notification_manager_impl.h"
-#include "components/html_viewer/web_scheduler_impl.h"
#include "components/html_viewer/web_theme_engine_impl.h"
#include "components/webcrypto/webcrypto_impl.h"
#include "mojo/services/network/public/interfaces/network_service.mojom.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebScrollbarBehavior.h"
+namespace scheduler {
+class RendererScheduler;
+class WebThreadImplForRendererScheduler;
+}
+
namespace mojo {
class ApplicationImpl;
}
@@ -33,7 +37,8 @@ class WebCookieJarImpl;
class BlinkPlatformImpl : public blink::Platform {
public:
// |app| may be null in tests.
- explicit BlinkPlatformImpl(mojo::ApplicationImpl* app);
+ BlinkPlatformImpl(mojo::ApplicationImpl* app,
+ scheduler::RendererScheduler* renderer_scheduler);
virtual ~BlinkPlatformImpl();
// blink::Platform methods:
@@ -41,7 +46,6 @@ class BlinkPlatformImpl : public blink::Platform {
virtual blink::WebClipboard* clipboard();
virtual blink::WebMimeRegistry* mimeRegistry();
virtual blink::WebThemeEngine* themeEngine();
- virtual blink::WebScheduler* scheduler();
virtual blink::WebString defaultLocale();
virtual blink::WebBlobRegistry* blobRegistry();
virtual double currentTime();
@@ -84,6 +88,7 @@ class BlinkPlatformImpl : public blink::Platform {
private:
void SuspendSharedTimer();
void ResumeSharedTimer();
+ void UpdateWebThreadTLS(blink::WebThread* thread);
void DoTimeout() {
if (shared_timer_func_ && !shared_timer_suspended_)
@@ -92,7 +97,10 @@ class BlinkPlatformImpl : public blink::Platform {
static void DestroyCurrentThread(void*);
- base::MessageLoop* main_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> MainTaskRunnerForCurrentThread();
+
+ scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
+ scoped_ptr<scheduler::WebThreadImplForRendererScheduler> main_thread_;
base::OneShotTimer<BlinkPlatformImpl> shared_timer_;
void (*shared_timer_func_)();
double shared_timer_fire_time_;
@@ -102,7 +110,6 @@ class BlinkPlatformImpl : public blink::Platform {
cc_blink::WebCompositorSupportImpl compositor_support_;
WebThemeEngineImpl theme_engine_;
WebMimeRegistryImpl mime_registry_;
- WebSchedulerImpl scheduler_;
webcrypto::WebCryptoImpl web_crypto_;
WebNotificationManagerImpl web_notification_manager_;
blink::WebScrollbarBehavior scrollbar_behavior_;

Powered by Google App Engine
This is Rietveld 408576698