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

Side by Side Diff: remoting/client/plugin/main_plugin_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_MAIN_PLUGIN_THREAD_TASK_RUNNER_H_
6 #define REMOTING_CLIENT_PLUGIN_MAIN_PLUGIN_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 MainPluginThreadTaskRunner : public base::SingleThreadTaskRunner {
Wez 2015/10/20 23:05:48 nit: I'd suggest calling this PepperMainThreadTask
Sergey Ulanov 2015/10/20 23:28:05 Done.
23 public:
24 MainPluginThreadTaskRunner();
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 ~MainPluginThreadTaskRunner() override;
37
38 private:
39 void RunTask(int32_t result, const base::Closure& closure);
Wez 2015/10/20 23:05:48 nit: Not at all obvious from the name & parameters
Sergey Ulanov 2015/10/20 23:28:05 Added comment and renamed second parameter.
40
41 pp::Core* core_;
42 pp::CompletionCallbackFactory<MainPluginThreadTaskRunner> callback_factory_;
43
44 DISALLOW_COPY_AND_ASSIGN(MainPluginThreadTaskRunner);
45 };
46
47 } // namespace remoting
48
49 #endif // REMOTING_CLIENT_PLUGIN_MAIN_PLUGIN_THREAD_TASK_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698