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

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

Issue 11458003: Remove scoped_refptr::release which is confusing and causes leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac Created 8 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 // static 346 // static
347 RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create( 347 RenderWidgetFullscreenPepper* RenderWidgetFullscreenPepper::Create(
348 int32 opener_id, webkit::ppapi::PluginInstance* plugin, 348 int32 opener_id, webkit::ppapi::PluginInstance* plugin,
349 const GURL& active_url, 349 const GURL& active_url,
350 const WebKit::WebScreenInfo& screen_info) { 350 const WebKit::WebScreenInfo& screen_info) {
351 DCHECK_NE(MSG_ROUTING_NONE, opener_id); 351 DCHECK_NE(MSG_ROUTING_NONE, opener_id);
352 scoped_refptr<RenderWidgetFullscreenPepper> widget( 352 scoped_refptr<RenderWidgetFullscreenPepper> widget(
353 new RenderWidgetFullscreenPepper(plugin, active_url, screen_info)); 353 new RenderWidgetFullscreenPepper(plugin, active_url, screen_info));
354 widget->Init(opener_id); 354 widget->Init(opener_id);
355 return widget.release(); 355 widget->AddRef();
356 return widget.get();
356 } 357 }
357 358
358 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper( 359 RenderWidgetFullscreenPepper::RenderWidgetFullscreenPepper(
359 webkit::ppapi::PluginInstance* plugin, 360 webkit::ppapi::PluginInstance* plugin,
360 const GURL& active_url, 361 const GURL& active_url,
361 const WebKit::WebScreenInfo& screen_info) 362 const WebKit::WebScreenInfo& screen_info)
362 : RenderWidgetFullscreen(screen_info), 363 : RenderWidgetFullscreen(screen_info),
363 active_url_(active_url), 364 active_url_(active_url),
364 plugin_(plugin), 365 plugin_(plugin),
365 context_(NULL), 366 context_(NULL),
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 677 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
677 if (!context_) { 678 if (!context_) {
678 CreateContext(); 679 CreateContext();
679 } 680 }
680 if (!context_) 681 if (!context_)
681 return NULL; 682 return NULL;
682 return context_; 683 return context_;
683 } 684 }
684 685
685 } // namespace content 686 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698