| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 m_context = Platform::current()->createOffscreenGraphicsContext3D(attrs); | 201 m_context = Platform::current()->createOffscreenGraphicsContext3D(attrs); |
| 202 if (m_context && !m_context->makeContextCurrent()) { | 202 if (m_context && !m_context->makeContextCurrent()) { |
| 203 delete m_context; | 203 delete m_context; |
| 204 m_context = 0; | 204 m_context = 0; |
| 205 } | 205 } |
| 206 | 206 |
| 207 if (!initScene()) | 207 if (!initScene()) |
| 208 return false; | 208 return false; |
| 209 | 209 |
| 210 m_layer = cc::TextureLayer::CreateForMailbox(this); | 210 m_layer = cc::TextureLayer::CreateForMailbox(this); |
| 211 m_webLayer = make_scoped_ptr(new webkit::WebLayerImpl(m_layer)); | 211 m_webLayer = make_scoped_ptr(InstantiateWebLayer(m_layer)); |
| 212 m_container = container; | 212 m_container = container; |
| 213 m_container->setWebLayer(m_webLayer.get()); | 213 m_container->setWebLayer(m_webLayer.get()); |
| 214 if (m_reRequestTouchEvents) { | 214 if (m_reRequestTouchEvents) { |
| 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 } |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 684 } | 684 } |
| 685 | 685 |
| 686 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) | 686 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) |
| 687 { | 687 { |
| 688 return mimeType == TestPlugin::mimeType() | 688 return mimeType == TestPlugin::mimeType() |
| 689 || mimeType == pluginPersistsMimeType() | 689 || mimeType == pluginPersistsMimeType() |
| 690 || mimeType == canCreateWithoutRendererMimeType(); | 690 || mimeType == canCreateWithoutRendererMimeType(); |
| 691 } | 691 } |
| 692 | 692 |
| 693 } // namespace content | 693 } // namespace content |
| OLD | NEW |