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

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 7670018: Fix fullscreen pepper leak (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer/render_widget_fullscreen_pepper.h" 5 #include "content/renderer/render_widget_fullscreen_pepper.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/renderer/gpu/gpu_channel_host.h" 9 #include "content/renderer/gpu/gpu_channel_host.h"
10 #include "content/renderer/pepper_platform_context_3d_impl.h" 10 #include "content/renderer/pepper_platform_context_3d_impl.h"
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } else { 253 } else {
254 didScrollRect(dx, dy, rect); 254 didScrollRect(dx, dy, rect);
255 } 255 }
256 } 256 }
257 257
258 void RenderWidgetFullscreenPepper::Destroy() { 258 void RenderWidgetFullscreenPepper::Destroy() {
259 // This function is called by the plugin instance as it's going away, so reset 259 // This function is called by the plugin instance as it's going away, so reset
260 // plugin_ to NULL to avoid calling into a dangling pointer e.g. on Close(). 260 // plugin_ to NULL to avoid calling into a dangling pointer e.g. on Close().
261 plugin_ = NULL; 261 plugin_ = NULL;
262 Send(new ViewHostMsg_Close(routing_id_)); 262 Send(new ViewHostMsg_Close(routing_id_));
263 Release();
263 } 264 }
264 265
265 webkit::ppapi::PluginDelegate::PlatformContext3D* 266 webkit::ppapi::PluginDelegate::PlatformContext3D*
266 RenderWidgetFullscreenPepper::CreateContext3D() { 267 RenderWidgetFullscreenPepper::CreateContext3D() {
267 if (!context_) { 268 if (!context_) {
268 CreateContext(); 269 CreateContext();
269 } 270 }
270 if (!context_) 271 if (!context_)
271 return NULL; 272 return NULL;
272 return new PlatformContext3DImpl(context_); 273 return new PlatformContext3DImpl(context_);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 NewRunnableFunction(DestroyContext, context_, program_, buffer_)); 488 NewRunnableFunction(DestroyContext, context_, program_, buffer_));
488 context_ = NULL; 489 context_ = NULL;
489 program_ = 0; 490 program_ = 0;
490 buffer_ = 0; 491 buffer_ = 0;
491 OnSwapBuffersAborted(); 492 OnSwapBuffersAborted();
492 } 493 }
493 494
494 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() { 495 void RenderWidgetFullscreenPepper::OnSwapBuffersCompleteByRendererGLContext() {
495 OnSwapBuffersComplete(); 496 OnSwapBuffersComplete();
496 } 497 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698