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

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

Issue 1122393003: CC: Plumb LayerSettings parameter for cc::Layer construction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 bool TestPlugin::initialize(blink::WebPluginContainer* container) { 216 bool TestPlugin::initialize(blink::WebPluginContainer* container) {
217 blink::WebGraphicsContext3D::Attributes attrs; 217 blink::WebGraphicsContext3D::Attributes attrs;
218 context_ = 218 context_ =
219 blink::Platform::current()->createOffscreenGraphicsContext3D(attrs); 219 blink::Platform::current()->createOffscreenGraphicsContext3D(attrs);
220 220
221 if (!InitScene()) 221 if (!InitScene())
222 return false; 222 return false;
223 223
224 layer_ = cc::TextureLayer::CreateForMailbox(this); 224 layer_ = delegate_->CreateTextureLayerForMailbox(this);
225 web_layer_ = make_scoped_ptr(delegate_->InstantiateWebLayer(layer_)); 225 web_layer_ = make_scoped_ptr(delegate_->InstantiateWebLayer(layer_));
226 container_ = container; 226 container_ = container;
227 container_->setWebLayer(web_layer_.get()); 227 container_->setWebLayer(web_layer_.get());
228 if (re_request_touch_events_) { 228 if (re_request_touch_events_) {
229 container_->requestTouchEventType( 229 container_->requestTouchEventType(
230 blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse); 230 blink::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse);
231 container_->requestTouchEventType( 231 container_->requestTouchEventType(
232 blink::WebPluginContainer::TouchEventRequestTypeRaw); 232 blink::WebPluginContainer::TouchEventRequestTypeRaw);
233 } 233 }
234 container_->requestTouchEventType(touch_event_request_); 234 container_->requestTouchEventType(touch_event_request_);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 return kPluginPersistsMimeType; 773 return kPluginPersistsMimeType;
774 } 774 }
775 775
776 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) { 776 bool TestPlugin::IsSupportedMimeType(const blink::WebString& mime_type) {
777 return mime_type == TestPlugin::MimeType() || 777 return mime_type == TestPlugin::MimeType() ||
778 mime_type == PluginPersistsMimeType() || 778 mime_type == PluginPersistsMimeType() ||
779 mime_type == CanCreateWithoutRendererMimeType(); 779 mime_type == CanCreateWithoutRendererMimeType();
780 } 780 }
781 781
782 } // namespace content 782 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/layout_test/blink_test_runner.cc ('k') | content/shell/renderer/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698