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

Unified Diff: content/utility/webthread_impl_for_utility_thread.h

Issue 1133563007: Adding WebThread and new BlinkPlatformImpl for utility thread. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit. Created 5 years, 7 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: content/utility/webthread_impl_for_utility_thread.h
diff --git a/content/utility/webthread_impl_for_utility_thread.h b/content/utility/webthread_impl_for_utility_thread.h
new file mode 100644
index 0000000000000000000000000000000000000000..490d74e26d7305ea67b1dae3a624feaa4b00f6bf
--- /dev/null
+++ b/content/utility/webthread_impl_for_utility_thread.h
@@ -0,0 +1,33 @@
+// Copyright 2015 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 CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_
+#define CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_
+
+#include "base/containers/scoped_ptr_hash_map.h"
+#include "components/scheduler/child/webthread_base.h"
+
+namespace content {
+
+class WebThreadImplForUtilityThread : public scheduler::WebThreadBase {
+ public:
+ explicit WebThreadImplForUtilityThread();
Sami 2015/05/11 17:08:02 No need for explicit since there are no parameters
ssid 2015/05/11 17:21:00 Done.
+ virtual ~WebThreadImplForUtilityThread();
Sami 2015/05/11 17:08:02 ~WebThreadImplForUtilityThread() override;
ssid 2015/05/11 17:21:00 Done.
+
+ // blink::WebThread implementation.
+ blink::WebScheduler* scheduler() const override;
+ blink::PlatformThreadId threadId() const override;
+
+ // WebThreadBase implementation.
+ base::SingleThreadTaskRunner* TaskRunner() const override;
+ scheduler::SingleThreadIdleTaskRunner* IdleTaskRunner() const override;
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+ blink::PlatformThreadId thread_id_;
+};
+
+} // namespace content
+
+#endif // CONTENT_UTILITY_WEBTHREAD_IMPL_FOR_UTILITY_THREAD_H_

Powered by Google App Engine
This is Rietveld 408576698