| 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 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 if (can_create_without_renderer_) | 167 if (can_create_without_renderer_) |
| 168 delegate_->PrintMessage( | 168 delegate_->PrintMessage( |
| 169 std::string("TestPlugin: canCreateWithoutRenderer\n")); | 169 std::string("TestPlugin: canCreateWithoutRenderer\n")); |
| 170 } | 170 } |
| 171 | 171 |
| 172 TestPlugin::~TestPlugin() { | 172 TestPlugin::~TestPlugin() { |
| 173 } | 173 } |
| 174 | 174 |
| 175 bool TestPlugin::initialize(blink::WebPluginContainer* container) { | 175 bool TestPlugin::initialize(blink::WebPluginContainer* container) { |
| 176 blink::WebGraphicsContext3D::Attributes attrs; | 176 blink::WebGraphicsContext3D::Attributes attrs; |
| 177 blink::WebGraphicsContext3D::WebGraphicsInfo gl_info; | 177 blink::Platform::GraphicsInfo gl_info; |
| 178 context_provider_ = make_scoped_ptr( | 178 context_provider_ = make_scoped_ptr( |
| 179 blink::Platform::current()->createOffscreenGraphicsContext3DProvider( | 179 blink::Platform::current()->createOffscreenGraphicsContext3DProvider( |
| 180 attrs, nullptr, &gl_info)); | 180 attrs, nullptr, &gl_info)); |
| 181 context_ = context_provider_ ? context_provider_->context3d() : nullptr; | 181 context_ = context_provider_ ? context_provider_->context3d() : nullptr; |
| 182 gl_ = context_provider_ ? context_provider_->contextGL() : nullptr; | 182 gl_ = context_provider_ ? context_provider_->contextGL() : nullptr; |
| 183 | 183 |
| 184 if (!InitScene()) | 184 if (!InitScene()) |
| 185 return false; | 185 return false; |
| 186 | 186 |
| 187 layer_ = cc::TextureLayer::CreateForMailbox(this); | 187 layer_ = cc::TextureLayer::CreateForMailbox(this); |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 return kPluginPersistsMimeType; | 728 return kPluginPersistsMimeType; |
| 729 } | 729 } |
| 730 | 730 |
| 731 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { | 731 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { |
| 732 return mime_type == TestPlugin::MimeType() || | 732 return mime_type == TestPlugin::MimeType() || |
| 733 mime_type == PluginPersistsMimeType() || | 733 mime_type == PluginPersistsMimeType() || |
| 734 mime_type == CanCreateWithoutRendererMimeType(); | 734 mime_type == CanCreateWithoutRendererMimeType(); |
| 735 } | 735 } |
| 736 | 736 |
| 737 } // namespace test_runner | 737 } // namespace test_runner |
| OLD | NEW |