OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/renderer/test_runner/TestPlugin.h" | 5 #include "content/shell/renderer/test_runner/TestPlugin.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest
TypeSynthesizedMouse); | 215 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest
TypeSynthesizedMouse); |
216 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest
TypeRaw); | 216 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest
TypeRaw); |
217 } | 217 } |
218 m_container->requestTouchEventType(m_touchEventRequest); | 218 m_container->requestTouchEventType(m_touchEventRequest); |
219 m_container->setWantsWheelEvents(true); | 219 m_container->setWantsWheelEvents(true); |
220 return true; | 220 return true; |
221 } | 221 } |
222 | 222 |
223 void TestPlugin::destroy() | 223 void TestPlugin::destroy() |
224 { | 224 { |
225 if (m_layer.get()) | 225 if (m_layer.get()) { |
226 m_layer->ClearTexture(); | 226 m_layer->WillModifyTexture(); |
| 227 m_layer->SetTextureMailbox(cc::TextureMailbox(), |
| 228 scoped_ptr<cc::SingleReleaseCallback>()); |
| 229 } |
227 if (m_container) | 230 if (m_container) |
228 m_container->setWebLayer(0); | 231 m_container->setWebLayer(0); |
229 m_webLayer.reset(); | 232 m_webLayer.reset(); |
230 m_layer = NULL; | 233 m_layer = NULL; |
231 destroyScene(); | 234 destroyScene(); |
232 | 235 |
233 delete m_context; | 236 delete m_context; |
234 m_context = 0; | 237 m_context = 0; |
235 | 238 |
236 m_container = 0; | 239 m_container = 0; |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 } | 692 } |
690 | 693 |
691 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) | 694 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) |
692 { | 695 { |
693 return mimeType == TestPlugin::mimeType() | 696 return mimeType == TestPlugin::mimeType() |
694 || mimeType == pluginPersistsMimeType() | 697 || mimeType == pluginPersistsMimeType() |
695 || mimeType == canCreateWithoutRendererMimeType(); | 698 || mimeType == canCreateWithoutRendererMimeType(); |
696 } | 699 } |
697 | 700 |
698 } | 701 } |
OLD | NEW |