OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 157 } |
158 | 158 |
159 WebThread* currentThread() override | 159 WebThread* currentThread() override |
160 { | 160 { |
161 return m_platform->currentThread(); | 161 return m_platform->currentThread(); |
162 } | 162 } |
163 | 163 |
164 private: | 164 private: |
165 blink::Platform* m_platform; // Not owned. | 165 blink::Platform* m_platform; // Not owned. |
166 WebCompositorSupportMock** m_compositor; | 166 WebCompositorSupportMock** m_compositor; |
167 virtual WebCompositorSupport* compositorSupport() override { return *m_c
ompositor; } | 167 WebCompositorSupport* compositorSupport() override { return *m_composito
r; } |
168 }; | 168 }; |
169 | 169 |
170 WebCompositorSupportMock* m_mockCompositor; | 170 WebCompositorSupportMock* m_mockCompositor; |
171 PlatformProxy m_proxyPlatform; | 171 PlatformProxy m_proxyPlatform; |
172 | 172 |
173 protected: | 173 protected: |
174 virtual void SetUp() | 174 virtual void SetUp() |
175 { | 175 { |
176 m_mockCompositor = 0; | 176 m_mockCompositor = 0; |
177 Platform::initialize(&m_proxyPlatform); | 177 Platform::initialize(&m_proxyPlatform); |
178 } | 178 } |
179 | 179 |
180 void setCompositorForTesting(WebCompositorSupportMock& mock) | 180 void setCompositorForTesting(WebCompositorSupportMock& mock) |
181 { | 181 { |
182 ASSERT(!m_mockCompositor); | 182 ASSERT(!m_mockCompositor); |
183 m_mockCompositor = &mock; | 183 m_mockCompositor = &mock; |
184 } | 184 } |
185 }; | 185 }; |
186 | 186 |
187 } | 187 } |
188 | 188 |
189 #endif | 189 #endif |
OLD | NEW |