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

Side by Side Diff: remoting/client/plugin/pepper_main_thread_task_runner.h

Issue 2823103003: Introduce TaskRunner::RunsTasksInCurrentSequence() (Closed)
Patch Set: rebase & remove inline keyword Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_ 6 #define REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 PepperMainThreadTaskRunner(); 26 PepperMainThreadTaskRunner();
27 27
28 // base::SingleThreadTaskRunner interface. 28 // base::SingleThreadTaskRunner interface.
29 bool PostDelayedTask(const tracked_objects::Location& from_here, 29 bool PostDelayedTask(const tracked_objects::Location& from_here,
30 base::OnceClosure task, 30 base::OnceClosure task,
31 base::TimeDelta delay) override; 31 base::TimeDelta delay) override;
32 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 32 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
33 base::OnceClosure task, 33 base::OnceClosure task,
34 base::TimeDelta delay) override; 34 base::TimeDelta delay) override;
35 bool RunsTasksOnCurrentThread() const override; 35 bool RunsTasksInCurrentSequence() const override;
36 36
37 protected: 37 protected:
38 ~PepperMainThreadTaskRunner() override; 38 ~PepperMainThreadTaskRunner() override;
39 39
40 private: 40 private:
41 // Helper that allows a base::Closure to be used as a pp::CompletionCallback, 41 // Helper that allows a base::Closure to be used as a pp::CompletionCallback,
42 // by ignoring the completion result. 42 // by ignoring the completion result.
43 void RunTask(base::OnceClosure task); 43 void RunTask(base::OnceClosure task);
44 44
45 pp::Core* core_; 45 pp::Core* core_;
46 46
47 base::WeakPtr<PepperMainThreadTaskRunner> weak_ptr_; 47 base::WeakPtr<PepperMainThreadTaskRunner> weak_ptr_;
48 base::WeakPtrFactory<PepperMainThreadTaskRunner> weak_ptr_factory_; 48 base::WeakPtrFactory<PepperMainThreadTaskRunner> weak_ptr_factory_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(PepperMainThreadTaskRunner); 50 DISALLOW_COPY_AND_ASSIGN(PepperMainThreadTaskRunner);
51 }; 51 };
52 52
53 } // namespace remoting 53 } // namespace remoting
54 54
55 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_ 55 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « remoting/base/auto_thread_task_runner.cc ('k') | remoting/client/plugin/pepper_main_thread_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698