Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: content/shell/test_runner/test_plugin.cc

Issue 2846843002: [blink] Unique pointers in Platform.h (Closed)
Patch Set: fix compilation (and again) Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/test_runner/test_plugin.h" 5 #include "content/shell/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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 DCHECK(container); 168 DCHECK(container);
169 DCHECK_EQ(this, container->Plugin()); 169 DCHECK_EQ(this, container->Plugin());
170 170
171 container_ = container; 171 container_ = container;
172 172
173 blink::Platform::ContextAttributes attrs; 173 blink::Platform::ContextAttributes attrs;
174 attrs.web_gl_version = 174 attrs.web_gl_version =
175 1; // We are creating a context through the WebGL APIs. 175 1; // We are creating a context through the WebGL APIs.
176 blink::WebURL url = container->GetDocument().Url(); 176 blink::WebURL url = container->GetDocument().Url();
177 blink::Platform::GraphicsInfo gl_info; 177 blink::Platform::GraphicsInfo gl_info;
178 context_provider_ = base::WrapUnique( 178 context_provider_ =
179 blink::Platform::Current()->CreateOffscreenGraphicsContext3DProvider( 179 blink::Platform::Current()->CreateOffscreenGraphicsContext3DProvider(
180 attrs, url, nullptr, &gl_info)); 180 attrs, url, nullptr, &gl_info);
181 if (!context_provider_->BindToCurrentThread()) 181 if (!context_provider_->BindToCurrentThread())
182 context_provider_ = nullptr; 182 context_provider_ = nullptr;
183 gl_ = context_provider_ ? context_provider_->ContextGL() : nullptr; 183 gl_ = context_provider_ ? context_provider_->ContextGL() : nullptr;
184 184
185 if (!InitScene()) 185 if (!InitScene())
186 return false; 186 return false;
187 187
188 layer_ = cc::TextureLayer::CreateForMailbox(this); 188 layer_ = cc::TextureLayer::CreateForMailbox(this);
189 web_layer_ = base::WrapUnique(new cc_blink::WebLayerImpl(layer_)); 189 web_layer_ = base::WrapUnique(new cc_blink::WebLayerImpl(layer_));
190 container_->SetWebLayer(web_layer_.get()); 190 container_->SetWebLayer(web_layer_.get());
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 return kPluginPersistsMimeType; 613 return kPluginPersistsMimeType;
614 } 614 }
615 615
616 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 616 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
617 return mime_type == TestPlugin::MimeType() || 617 return mime_type == TestPlugin::MimeType() ||
618 mime_type == PluginPersistsMimeType() || 618 mime_type == PluginPersistsMimeType() ||
619 mime_type == CanCreateWithoutRendererMimeType(); 619 mime_type == CanCreateWithoutRendererMimeType();
620 } 620 }
621 621
622 } // namespace test_runner 622 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698