diff options
author | lfg <lfg@chromium.org> | 2015-06-03 08:58:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-03 15:59:03 +0000 |
commit | 7984f01c8755d6dc229f58e65c5cc7037a499c5f (patch) | |
tree | 353b11f4daa7133531192c88ffad79bb66897511 /components/printing | |
parent | 00fb9d398c26958051ea773cf793f17abd2c0f26 (diff) | |
download | chromium_src-7984f01c8755d6dc229f58e65c5cc7037a499c5f.zip chromium_src-7984f01c8755d6dc229f58e65c5cc7037a499c5f.tar.gz chromium_src-7984f01c8755d6dc229f58e65c5cc7037a499c5f.tar.bz2 |
Detach old frame on WebFrame::swap.
This is a prerequisite for https://codereview.chromium.org/1041473002/.
BUG=464764
Review URL: https://codereview.chromium.org/1149793002
Cr-Commit-Position: refs/heads/master@{#332619}
Diffstat (limited to 'components/printing')
-rw-r--r-- | components/printing/renderer/print_web_view_helper.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc index eca09fe..313d12d 100644 --- a/components/printing/renderer/print_web_view_helper.cc +++ b/components/printing/renderer/print_web_view_helper.cc @@ -594,7 +594,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, DetachType type); private: void CallOnReady(); @@ -745,6 +747,12 @@ blink::WebFrame* PrepareFrameAndViewForPrint::createChildFrame( } void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame) { + frameDetached(frame, DetachType::Remove); +} + +void PrepareFrameAndViewForPrint::frameDetached(blink::WebFrame* frame, + DetachType type) { + DCHECK(type == DetachType::Remove); if (frame->parent()) frame->parent()->removeChild(frame); frame->close(); |