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

Side by Side Diff: third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h

Issue 2812313002: [scheduler] Remove blink::scheduler::TaskQueue from public API. (Closed)
Patch Set: Rebased & addressed skyostil@'s comment Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 namespace cc { 52 namespace cc {
53 class OrderedSimpleTaskRunner; 53 class OrderedSimpleTaskRunner;
54 } 54 }
55 55
56 namespace cc_blink { 56 namespace cc_blink {
57 class WebCompositorSupportImpl; 57 class WebCompositorSupportImpl;
58 } // namespace cc_blink 58 } // namespace cc_blink
59 59
60 namespace blink { 60 namespace blink {
61 namespace scheduler { 61 namespace scheduler {
62 class RendererScheduler;
63 class RendererSchedulerImpl; 62 class RendererSchedulerImpl;
64 } 63 }
65 class WebCompositorSupport; 64 class WebCompositorSupport;
66 class WebThread; 65 class WebThread;
67 66
68 class TestingCompositorSupport : public WebCompositorSupport { 67 class TestingCompositorSupport : public WebCompositorSupport {
69 std::unique_ptr<WebLayer> CreateLayer() override; 68 std::unique_ptr<WebLayer> CreateLayer() override;
70 std::unique_ptr<WebLayer> CreateLayerFromCCLayer(cc::Layer*) override; 69 std::unique_ptr<WebLayer> CreateLayerFromCCLayer(cc::Layer*) override;
71 std::unique_ptr<WebContentLayer> CreateContentLayer( 70 std::unique_ptr<WebContentLayer> CreateContentLayer(
72 WebContentLayerClient*) override; 71 WebContentLayerClient*) override;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 void RunUntilIdle() override; 153 void RunUntilIdle() override;
155 154
156 // Runs for |seconds| the testing clock is advanced by |seconds|. Note real 155 // Runs for |seconds| the testing clock is advanced by |seconds|. Note real
157 // time elapsed will typically much less than |seconds| because delays between 156 // time elapsed will typically much less than |seconds| because delays between
158 // timers are fast forwarded. 157 // timers are fast forwarded.
159 void RunForPeriodSeconds(double seconds); 158 void RunForPeriodSeconds(double seconds);
160 159
161 // Advances |m_clock| by |seconds|. 160 // Advances |m_clock| by |seconds|.
162 void AdvanceClockSeconds(double seconds); 161 void AdvanceClockSeconds(double seconds);
163 162
164 scheduler::RendererScheduler* GetRendererScheduler() const; 163 scheduler::RendererSchedulerImpl* GetRendererScheduler() const;
165 164
166 // Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will 165 // Controls the behavior of |m_mockTaskRunner| if true, then |m_clock| will
167 // be advanced to the next timer when there's no more immediate work to do. 166 // be advanced to the next timer when there's no more immediate work to do.
168 void SetAutoAdvanceNowToPendingTasks(bool); 167 void SetAutoAdvanceNowToPendingTasks(bool);
169 168
170 protected: 169 protected:
171 static double GetTestTime(); 170 static double GetTestTime();
172 171
173 std::unique_ptr<base::SimpleTestTickClock> clock_; 172 std::unique_ptr<base::SimpleTestTickClock> clock_;
174 scoped_refptr<cc::OrderedSimpleTaskRunner> mock_task_runner_; 173 scoped_refptr<cc::OrderedSimpleTaskRunner> mock_task_runner_;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 discardable_memory_allocator_; 235 discardable_memory_allocator_;
237 std::unique_ptr<DummyPlatform> dummy_platform_; 236 std::unique_ptr<DummyPlatform> dummy_platform_;
238 std::unique_ptr<cc_blink::WebCompositorSupportImpl> compositor_support_; 237 std::unique_ptr<cc_blink::WebCompositorSupportImpl> compositor_support_;
239 TestingPlatformSupport::Config testing_platform_config_; 238 TestingPlatformSupport::Config testing_platform_config_;
240 std::unique_ptr<TestingPlatformSupport> testing_platform_support_; 239 std::unique_ptr<TestingPlatformSupport> testing_platform_support_;
241 }; 240 };
242 241
243 } // namespace blink 242 } // namespace blink
244 243
245 #endif // TestingPlatformSupport_h 244 #endif // TestingPlatformSupport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698