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

Side by Side Diff: trunk/src/content/shell/renderer/test_runner/TestPlugin.cpp

Issue 224153003: Revert 261380 "cc: Remove TextureLayer::SetTextureId and Texture..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « trunk/src/cc/layers/texture_layer_unittest.cc ('k') | trunk/src/ui/compositor/layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/TestPlugin.h" 5 #include "content/shell/renderer/test_runner/TestPlugin.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
215 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest TypeSynthesizedMouse); 215 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest TypeSynthesizedMouse);
216 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest TypeRaw); 216 m_container->requestTouchEventType(WebPluginContainer::TouchEventRequest TypeRaw);
217 } 217 }
218 m_container->requestTouchEventType(m_touchEventRequest); 218 m_container->requestTouchEventType(m_touchEventRequest);
219 m_container->setWantsWheelEvents(true); 219 m_container->setWantsWheelEvents(true);
220 return true; 220 return true;
221 } 221 }
222 222
223 void TestPlugin::destroy() 223 void TestPlugin::destroy()
224 { 224 {
225 if (m_layer.get()) 225 if (m_layer.get()) {
226 m_layer->ClearTexture(); 226 m_layer->WillModifyTexture();
227 m_layer->SetTextureMailbox(cc::TextureMailbox(),
228 scoped_ptr<cc::SingleReleaseCallback>());
229 }
227 if (m_container) 230 if (m_container)
228 m_container->setWebLayer(0); 231 m_container->setWebLayer(0);
229 m_webLayer.reset(); 232 m_webLayer.reset();
230 m_layer = NULL; 233 m_layer = NULL;
231 destroyScene(); 234 destroyScene();
232 235
233 delete m_context; 236 delete m_context;
234 m_context = 0; 237 m_context = 0;
235 238
236 m_container = 0; 239 m_container = 0;
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 692 }
690 693
691 bool TestPlugin::isSupportedMimeType(const WebString& mimeType) 694 bool TestPlugin::isSupportedMimeType(const WebString& mimeType)
692 { 695 {
693 return mimeType == TestPlugin::mimeType() 696 return mimeType == TestPlugin::mimeType()
694 || mimeType == pluginPersistsMimeType() 697 || mimeType == pluginPersistsMimeType()
695 || mimeType == canCreateWithoutRendererMimeType(); 698 || mimeType == canCreateWithoutRendererMimeType();
696 } 699 }
697 700
698 } 701 }
OLDNEW
« no previous file with comments | « trunk/src/cc/layers/texture_layer_unittest.cc ('k') | trunk/src/ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698