OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |