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

Side by Side Diff: content/browser/compositor/reflector_impl_unittest.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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 #include "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/scheduler/begin_frame_source.h" 10 #include "cc/scheduler/begin_frame_source.h"
(...skipping 16 matching lines...) Expand all
27 #include "ui/ozone/public/overlay_candidates_ozone.h" 27 #include "ui/ozone/public/overlay_candidates_ozone.h"
28 #endif // defined(USE_OZONE) 28 #endif // defined(USE_OZONE)
29 29
30 namespace content { 30 namespace content {
31 namespace { 31 namespace {
32 class FakeTaskRunner : public base::SingleThreadTaskRunner { 32 class FakeTaskRunner : public base::SingleThreadTaskRunner {
33 public: 33 public:
34 FakeTaskRunner() {} 34 FakeTaskRunner() {}
35 35
36 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 36 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
37 const base::Closure& task, 37 base::OnceClosure task,
38 base::TimeDelta delay) override { 38 base::TimeDelta delay) override {
39 return true; 39 return true;
40 } 40 }
41 bool PostDelayedTask(const tracked_objects::Location& from_here, 41 bool PostDelayedTask(const tracked_objects::Location& from_here,
42 const base::Closure& task, 42 base::OnceClosure task,
43 base::TimeDelta delay) override { 43 base::TimeDelta delay) override {
44 return true; 44 return true;
45 } 45 }
46 bool RunsTasksOnCurrentThread() const override { return true; } 46 bool RunsTasksOnCurrentThread() const override { return true; }
47 47
48 protected: 48 protected:
49 ~FakeTaskRunner() override {} 49 ~FakeTaskRunner() override {}
50 }; 50 };
51 51
52 #if defined(USE_OZONE) 52 #if defined(USE_OZONE)
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 plane_2.plane_z_order = 1; 226 plane_2.plane_z_order = 1;
227 list.push_back(plane_1); 227 list.push_back(plane_1);
228 list.push_back(plane_2); 228 list.push_back(plane_2);
229 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); 229 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list);
230 EXPECT_FALSE(list[0].overlay_handled); 230 EXPECT_FALSE(list[0].overlay_handled);
231 } 231 }
232 #endif // defined(USE_OZONE) 232 #endif // defined(USE_OZONE)
233 233
234 } // namespace 234 } // namespace
235 } // namespace content 235 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_thread_impl.cc ('k') | content/browser/dom_storage/dom_storage_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698