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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 }; | 124 }; |
125 | 125 |
126 private: | 126 private: |
127 class PlatformProxy : public blink::Platform { | 127 class PlatformProxy : public blink::Platform { |
128 public: | 128 public: |
129 PlatformProxy(WebCompositorSupportMock** compositor) : m_compositor(comp
ositor) { } | 129 PlatformProxy(WebCompositorSupportMock** compositor) : m_compositor(comp
ositor) { } |
130 | 130 |
131 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) { ASSERT_NOT_REACHED(); } | 131 virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t
length) { ASSERT_NOT_REACHED(); } |
132 private: | 132 private: |
133 WebCompositorSupportMock** m_compositor; | 133 WebCompositorSupportMock** m_compositor; |
134 blink::WebCompositorSupport* compositorSupport() OVERRIDE { return *m_co
mpositor; } | 134 virtual blink::WebCompositorSupport* compositorSupport() OVERRIDE { retu
rn *m_compositor; } |
135 }; | 135 }; |
136 | 136 |
137 WebCompositorSupportMock* m_mockCompositor; | 137 WebCompositorSupportMock* m_mockCompositor; |
138 PlatformProxy m_proxyPlatform; | 138 PlatformProxy m_proxyPlatform; |
139 | 139 |
140 protected: | 140 protected: |
141 blink::Platform* m_platform; | 141 blink::Platform* m_platform; |
142 | 142 |
143 virtual void SetUp() | 143 virtual void SetUp() |
144 { | 144 { |
(...skipping 10 matching lines...) Expand all Loading... |
155 void setCompositorForTesting(WebCompositorSupportMock& mock) | 155 void setCompositorForTesting(WebCompositorSupportMock& mock) |
156 { | 156 { |
157 ASSERT(!m_mockCompositor); | 157 ASSERT(!m_mockCompositor); |
158 m_mockCompositor = &mock; | 158 m_mockCompositor = &mock; |
159 } | 159 } |
160 }; | 160 }; |
161 | 161 |
162 } | 162 } |
163 | 163 |
164 #endif | 164 #endif |
OLD | NEW |