Chromium Code Reviews| 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(); |