| 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 "components/test_runner/test_plugin.h" | 5 #include "components/test_runner/test_plugin.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 DCHECK_EQ(this, container->plugin()); | 178 DCHECK_EQ(this, container->plugin()); |
| 179 | 179 |
| 180 container_ = container; | 180 container_ = container; |
| 181 | 181 |
| 182 blink::Platform::ContextAttributes attrs; | 182 blink::Platform::ContextAttributes attrs; |
| 183 attrs.webGLVersion = 1; // We are creating a context through the WebGL APIs. | 183 attrs.webGLVersion = 1; // We are creating a context through the WebGL APIs. |
| 184 blink::WebURL url = container->document().url(); | 184 blink::WebURL url = container->document().url(); |
| 185 blink::Platform::GraphicsInfo gl_info; | 185 blink::Platform::GraphicsInfo gl_info; |
| 186 context_provider_ = base::WrapUnique( | 186 context_provider_ = base::WrapUnique( |
| 187 blink::Platform::current()->createOffscreenGraphicsContext3DProvider( | 187 blink::Platform::current()->createOffscreenGraphicsContext3DProvider( |
| 188 attrs, url, nullptr, &gl_info)); | 188 attrs, url, nullptr, &gl_info, blink::Platform::BindToCurrentThread)); |
| 189 gl_ = context_provider_ ? context_provider_->contextGL() : nullptr; | 189 gl_ = context_provider_ ? context_provider_->contextGL() : nullptr; |
| 190 | 190 |
| 191 if (!InitScene()) | 191 if (!InitScene()) |
| 192 return false; | 192 return false; |
| 193 | 193 |
| 194 layer_ = cc::TextureLayer::CreateForMailbox(this); | 194 layer_ = cc::TextureLayer::CreateForMailbox(this); |
| 195 web_layer_ = base::WrapUnique(new cc_blink::WebLayerImpl(layer_)); | 195 web_layer_ = base::WrapUnique(new cc_blink::WebLayerImpl(layer_)); |
| 196 container_->setWebLayer(web_layer_.get()); | 196 container_->setWebLayer(web_layer_.get()); |
| 197 if (re_request_touch_events_) { | 197 if (re_request_touch_events_) { |
| 198 container_->requestTouchEventType( | 198 container_->requestTouchEventType( |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 return kPluginPersistsMimeType; | 730 return kPluginPersistsMimeType; |
| 731 } | 731 } |
| 732 | 732 |
| 733 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 733 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
| 734 return mime_type == TestPlugin::MimeType() || | 734 return mime_type == TestPlugin::MimeType() || |
| 735 mime_type == PluginPersistsMimeType() || | 735 mime_type == PluginPersistsMimeType() || |
| 736 mime_type == CanCreateWithoutRendererMimeType(); | 736 mime_type == CanCreateWithoutRendererMimeType(); |
| 737 } | 737 } |
| 738 | 738 |
| 739 } // namespace test_runner | 739 } // namespace test_runner |
| OLD | NEW |