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

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

Issue 1716713003: Refactor ScrollAnimatorMac to use CancellableTaskFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Need to implement TestingPlatformMockWebTaskRunner::clone Created 4 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 m_tasks->append(adoptPtr(task)); 120 m_tasks->append(adoptPtr(task));
121 } 121 }
122 122
123 void postDelayedTask(const WebTraceLocation&, Task*, double delayMs) overrid e 123 void postDelayedTask(const WebTraceLocation&, Task*, double delayMs) overrid e
124 { 124 {
125 ASSERT_NOT_REACHED(); 125 ASSERT_NOT_REACHED();
126 } 126 }
127 127
128 WebTaskRunner* clone() override 128 WebTaskRunner* clone() override
129 { 129 {
130 ASSERT_NOT_REACHED(); 130 return new TestingPlatformMockWebTaskRunner(m_tasks);
131 return nullptr;
132 } 131 }
133 132
134 private: 133 private:
135 Deque<OwnPtr<WebTaskRunner::Task>>* m_tasks; // NOT OWNED 134 Deque<OwnPtr<WebTaskRunner::Task>>* m_tasks; // NOT OWNED
136 }; 135 };
137 136
138 // TestingPlatformMockScheduler definition: 137 // TestingPlatformMockScheduler definition:
139 138
140 TestingPlatformMockScheduler::TestingPlatformMockScheduler() 139 TestingPlatformMockScheduler::TestingPlatformMockScheduler()
141 : m_mockWebTaskRunner(adoptPtr(new TestingPlatformMockWebTaskRunner(&m_tasks ))) { } 140 : m_mockWebTaskRunner(adoptPtr(new TestingPlatformMockWebTaskRunner(&m_tasks ))) { }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 { 210 {
212 return m_mockWebThread.get(); 211 return m_mockWebThread.get();
213 } 212 }
214 213
215 TestingPlatformMockScheduler* TestingPlatformSupportWithMockScheduler::mockWebSc heduler() 214 TestingPlatformMockScheduler* TestingPlatformSupportWithMockScheduler::mockWebSc heduler()
216 { 215 {
217 return m_mockWebThread->mockWebScheduler(); 216 return m_mockWebThread->mockWebScheduler();
218 } 217 }
219 218
220 } // namespace blink 219 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/mac/ScrollAnimatorMac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698