Fix task runner checking

This commit is contained in:
Marshall Greenblatt
2017-09-21 13:57:40 +02:00
parent b0edce9c9d
commit 6bcbefa5fc
12 changed files with 39 additions and 33 deletions

View File

@ -8,18 +8,18 @@
#include "include/cef_task.h"
#include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h"
class CefTaskRunnerImpl : public CefTaskRunner {
public:
explicit CefTaskRunnerImpl(
scoped_refptr<base::SequencedTaskRunner> task_runner);
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
// Returns the task runner associated with |threadId|.
static scoped_refptr<base::SequencedTaskRunner> GetTaskRunner(
static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunner(
CefThreadId threadId);
// Returns the current task runner.
static scoped_refptr<base::SequencedTaskRunner> GetCurrentTaskRunner();
static scoped_refptr<base::SingleThreadTaskRunner> GetCurrentTaskRunner();
// CefTaskRunner methods:
bool IsSame(CefRefPtr<CefTaskRunner> that) override;
@ -29,7 +29,7 @@ class CefTaskRunnerImpl : public CefTaskRunner {
bool PostDelayedTask(CefRefPtr<CefTask> task, int64 delay_ms) override;
private:
scoped_refptr<base::SequencedTaskRunner> task_runner_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
IMPLEMENT_REFCOUNTING(CefTaskRunnerImpl);
DISALLOW_COPY_AND_ASSIGN(CefTaskRunnerImpl);