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

Side by Side Diff: content/browser/web_contents/web_contents_view_guest.cc

Issue 647613002: Fix RenderWidgetHostViewGuest leak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 2 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 (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/browser/web_contents/web_contents_view_guest.h" 5 #include "content/browser/web_contents/web_contents_view_guest.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "content/browser/browser_plugin/browser_plugin_embedder.h" 8 #include "content/browser/browser_plugin/browser_plugin_embedder.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/frame_host/interstitial_page_impl.h" 10 #include "content/browser/frame_host/interstitial_page_impl.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 DCHECK(RenderViewHostFactory::has_factory()); 150 DCHECK(RenderViewHostFactory::has_factory());
151 return static_cast<RenderWidgetHostViewBase*>( 151 return static_cast<RenderWidgetHostViewBase*>(
152 render_widget_host->GetView()); 152 render_widget_host->GetView());
153 } 153 }
154 154
155 RenderWidgetHostViewBase* platform_widget = 155 RenderWidgetHostViewBase* platform_widget =
156 platform_view_->CreateViewForWidget(render_widget_host); 156 platform_view_->CreateViewForWidget(render_widget_host);
157 157
158 return new RenderWidgetHostViewGuest(render_widget_host, 158 return new RenderWidgetHostViewGuest(render_widget_host,
159 guest_, 159 guest_,
160 platform_widget); 160 platform_widget->GetWeakPtr());
161 } 161 }
162 162
163 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget( 163 RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForPopupWidget(
164 RenderWidgetHost* render_widget_host) { 164 RenderWidgetHost* render_widget_host) {
165 return platform_view_->CreateViewForPopupWidget(render_widget_host); 165 return platform_view_->CreateViewForPopupWidget(render_widget_host);
166 } 166 }
167 167
168 void WebContentsViewGuest::SetPageTitle(const base::string16& title) { 168 void WebContentsViewGuest::SetPageTitle(const base::string16& title) {
169 } 169 }
170 170
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 embedder_render_view_host->GetDelegate()->GetDelegateView(); 249 embedder_render_view_host->GetDelegate()->GetDelegateView();
250 if (view) { 250 if (view) {
251 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag")); 251 RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.StartDrag"));
252 view->StartDragging(drop_data, ops, image, image_offset, event_info); 252 view->StartDragging(drop_data, ops, image, image_offset, event_info);
253 } else { 253 } else {
254 embedder_web_contents->SystemDragEnded(); 254 embedder_web_contents->SystemDragEnded();
255 } 255 }
256 } 256 }
257 257
258 } // namespace content 258 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698