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

Unified Diff: content/child/webthread_base.h

Issue 1088933002: Revert of Add a WorkerScheduler and a WebThreadImplForWorker (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
« no previous file with comments | « content/child/threaded_data_provider.cc ('k') | content/child/webthread_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webthread_base.h
diff --git a/content/child/webthread_base.h b/content/child/webthread_base.h
deleted file mode 100644
index 5d6ebb9b0f05ff1855116f80870e2d8fda1ad696..0000000000000000000000000000000000000000
--- a/content/child/webthread_base.h
+++ /dev/null
@@ -1,80 +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 CONTENT_CHILD_WEBTHREAD_BASE_H_
-#define CONTENT_CHILD_WEBTHREAD_BASE_H_
-
-#include <map>
-
-#include "base/memory/scoped_ptr.h"
-#include "base/threading/thread.h"
-#include "content/common/content_export.h"
-#include "third_party/WebKit/public/platform/WebThread.h"
-
-namespace blink {
-class WebTraceLocation;
-}
-
-namespace content {
-class SingleThreadIdleTaskRunner;
-
-class CONTENT_EXPORT WebThreadBase : public blink::WebThread {
- public:
- virtual ~WebThreadBase();
-
- // blink::WebThread implementation.
- virtual bool isCurrentThread() const;
- virtual blink::PlatformThreadId threadId() const = 0;
-
- virtual void postTask(const blink::WebTraceLocation& location, Task* task);
- virtual void postDelayedTask(const blink::WebTraceLocation& location,
- Task* task,
- long long delay_ms);
- virtual void postIdleTask(const blink::WebTraceLocation& location,
- IdleTask* idle_task);
- virtual void postIdleTaskAfterWakeup(const blink::WebTraceLocation& location,
- IdleTask* idle_task);
-
- virtual void enterRunLoop();
- virtual void exitRunLoop();
-
- virtual void addTaskObserver(TaskObserver* observer);
- virtual void removeTaskObserver(TaskObserver* observer);
-
- // Returns the base::Bind-compatible task runner for posting tasks to this
- // thread. Can be called from any thread.
- virtual base::SingleThreadTaskRunner* TaskRunner() const = 0;
-
- // Returns the base::Bind-compatible task runner for posting idle tasks to
- // this thread. Can be called from any thread.
- virtual SingleThreadIdleTaskRunner* IdleTaskRunner() const = 0;
-
- protected:
- class TaskObserverAdapter;
-
- WebThreadBase();
-
- // Returns the underlying MessageLoop for this thread. Only used for entering
- // and exiting a nested run loop. Only called on the thread that the
- // WebThread belongs to.
- virtual base::MessageLoop* MessageLoop() const = 0;
-
- virtual void AddTaskObserverInternal(
- base::MessageLoop::TaskObserver* observer);
- virtual void RemoveTaskObserverInternal(
- base::MessageLoop::TaskObserver* observer);
-
- static void RunWebThreadTask(scoped_ptr<blink::WebThread::Task> task);
- static void RunWebThreadIdleTask(
- scoped_ptr<blink::WebThread::IdleTask> idle_task,
- base::TimeTicks deadline);
-
- private:
- typedef std::map<TaskObserver*, TaskObserverAdapter*> TaskObserverMap;
- TaskObserverMap task_observer_map_;
-};
-
-} // namespace content
-
-#endif // CONTENT_CHILD_WEBTHREAD_BASE_H_
« no previous file with comments | « content/child/threaded_data_provider.cc ('k') | content/child/webthread_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698