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/test_plugin.h" | 5 #include "content/shell/renderer/test_runner/test_plugin.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 } | 215 } |
216 | 216 |
217 bool TestPlugin::initialize(blink::WebPluginContainer* container) { | 217 bool TestPlugin::initialize(blink::WebPluginContainer* container) { |
218 blink::WebGraphicsContext3D::Attributes attrs; | 218 blink::WebGraphicsContext3D::Attributes attrs; |
219 context_ = | 219 context_ = |
220 blink::Platform::current()->createOffscreenGraphicsContext3D(attrs); | 220 blink::Platform::current()->createOffscreenGraphicsContext3D(attrs); |
221 | 221 |
222 if (!InitScene()) | 222 if (!InitScene()) |
223 return false; | 223 return false; |
224 | 224 |
225 layer_ = cc::TextureLayer::CreateForMailbox(this); | 225 layer_ = |
| 226 cc::TextureLayer::CreateForMailbox(WebLayerImpl::LayerSettings(), this); |
226 web_layer_ = make_scoped_ptr(InstantiateWebLayer(layer_)); | 227 web_layer_ = make_scoped_ptr(InstantiateWebLayer(layer_)); |
227 container_ = container; | 228 container_ = container; |
228 container_->setWebLayer(web_layer_.get()); | 229 container_->setWebLayer(web_layer_.get()); |
229 if (re_request_touch_events_) { | 230 if (re_request_touch_events_) { |
230 container_->requestTouchEventType( | 231 container_->requestTouchEventType( |
231 blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse); | 232 blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse); |
232 container_->requestTouchEventType( | 233 container_->requestTouchEventType( |
233 blink::WebPluginContainer::TouchEventRequestTypeRaw); | 234 blink::WebPluginContainer::TouchEventRequestTypeRaw); |
234 } | 235 } |
235 container_->requestTouchEventType(touch_event_request_); | 236 container_->requestTouchEventType(touch_event_request_); |
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 return kPluginPersistsMimeType; | 775 return kPluginPersistsMimeType; |
775 } | 776 } |
776 | 777 |
777 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 778 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
778 return mime_type == TestPlugin::MimeType() || | 779 return mime_type == TestPlugin::MimeType() || |
779 mime_type == PluginPersistsMimeType() || | 780 mime_type == PluginPersistsMimeType() || |
780 mime_type == CanCreateWithoutRendererMimeType(); | 781 mime_type == CanCreateWithoutRendererMimeType(); |
781 } | 782 } |
782 | 783 |
783 } // namespace content | 784 } // namespace content |
OLD | NEW |