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

Unified Diff: components/printing/renderer/print_web_view_helper.cc

Issue 1149793002: Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: properly rebasing 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('j') | content/renderer/render_frame_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/printing/renderer/print_web_view_helper.cc
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index ab65ed6f255d98276b33fc6e70e8d784fe36efcd..bc6a44e25617587ea1769820276bfb8ceded8878 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -592,7 +592,9 @@ class PrepareFrameAndViewForPrint : public blink::WebViewClient,
blink::WebTreeScopeType scope,
const blink::WebString& name,
blink::WebSandboxFlags sandboxFlags);
+ // TODO(lfg): Remove this method once the blink patch lands.
virtual void frameDetached(blink::WebFrame* frame);
+ virtual void frameDetached(blink::WebFrame* frame, bool for_replacement);
dcheng 2015/05/28 21:55:59 Can we try to come up with an enum instead of a bo
lfg 2015/05/29 18:34:44 Done.
private:
void CallOnReady();
@@ -743,6 +745,12 @@ blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame(
}
void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame) {
+ frameDetached(frame, false);
+}
+
+void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame,
+ bool for_replacement) {
+ DCHECK_EQ(for_replacement, false);
if (frame->parent())
frame->parent()->removeChild(frame);
frame->close();
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.h » ('j') | content/renderer/render_frame_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698