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

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

Issue 1410923004: Replace PluginThreadTaskRunner with a simpler MainPluginThreadTaskRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_mac_test
Patch Set: Created 5 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
6 #define REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
7
8 #include "base/callback_forward.h"
9 #include "base/compiler_specific.h"
10 #include "base/macros.h"
11 #include "base/single_thread_task_runner.h"
12 #include "base/time/time.h"
13 #include "ppapi/utility/completion_callback_factory.h"
14
15 namespace pp {
16 class Core;
17 } // namespace pp
18
19 namespace remoting {
20
21 // SingleThreadTaskRunner implementation for the main plugin thread.
22 class PepperMainThreadTaskRunner : public base::SingleThreadTaskRunner {
23 public:
24 PepperMainThreadTaskRunner();
25
26 // base::SingleThreadTaskRunner interface.
27 bool PostDelayedTask(const tracked_objects::Location& from_here,
28 const base::Closure& task,
29 base::TimeDelta delay) override;
30 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
31 const base::Closure& task,
32 base::TimeDelta delay) override;
33 bool RunsTasksOnCurrentThread() const override;
34
35 protected:
36 ~PepperMainThreadTaskRunner() override;
37
38 private:
39 // Helper that allows a base::Closure to be used as a pp::CompletionCallback,
40 // by ignoring the completion result.
41 void RunTask(int32_t result, const base::Closure& task);
42
43 pp::Core* core_;
44 pp::CompletionCallbackFactory<PepperMainThreadTaskRunner> callback_factory_;
45
46 DISALLOW_COPY_AND_ASSIGN(PepperMainThreadTaskRunner);
47 };
48
49 } // namespace remoting
50
51 #endif // REMOTING_CLIENT_PLUGIN_PEPPER_MAIN_THREAD_TASK_RUNNER_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/chromoting_instance.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