| OLD | NEW |
| 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 "components/printing/renderer/print_web_view_helper.h" | 5 #include "components/printing/renderer/print_web_view_helper.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 } | 832 } |
| 833 | 833 |
| 834 blink::WebLocalFrame* PrepareFrameAndViewForPrint::CreateChildFrame( | 834 blink::WebLocalFrame* PrepareFrameAndViewForPrint::CreateChildFrame( |
| 835 blink::WebLocalFrame* parent, | 835 blink::WebLocalFrame* parent, |
| 836 blink::WebTreeScopeType scope, | 836 blink::WebTreeScopeType scope, |
| 837 const blink::WebString& name, | 837 const blink::WebString& name, |
| 838 const blink::WebString& fallback_name, | 838 const blink::WebString& fallback_name, |
| 839 blink::WebSandboxFlags sandbox_flags, | 839 blink::WebSandboxFlags sandbox_flags, |
| 840 const blink::WebParsedFeaturePolicy& container_policy, | 840 const blink::WebParsedFeaturePolicy& container_policy, |
| 841 const blink::WebFrameOwnerProperties& frame_owner_properties) { | 841 const blink::WebFrameOwnerProperties& frame_owner_properties) { |
| 842 blink::WebLocalFrame* frame = | 842 // This is called when printing a selection and when this selection contains |
| 843 parent->CreateLocalChild(scope, this, nullptr, nullptr); | 843 // an iframe. This is not supported yet. An empty rectangle will be displayed |
| 844 return frame; | 844 // instead. |
| 845 // Please see: https://crbug.com/732780. |
| 846 return nullptr; |
| 845 } | 847 } |
| 846 | 848 |
| 847 std::unique_ptr<blink::WebURLLoader> | 849 std::unique_ptr<blink::WebURLLoader> |
| 848 PrepareFrameAndViewForPrint::CreateURLLoader() { | 850 PrepareFrameAndViewForPrint::CreateURLLoader() { |
| 849 // TODO(yhirano): Stop using Platform::CreateURLLoader() here. | 851 // TODO(yhirano): Stop using Platform::CreateURLLoader() here. |
| 850 return blink::Platform::Current()->CreateURLLoader(); | 852 return blink::Platform::Current()->CreateURLLoader(); |
| 851 } | 853 } |
| 852 | 854 |
| 853 void PrepareFrameAndViewForPrint::CallOnReady() { | 855 void PrepareFrameAndViewForPrint::CallOnReady() { |
| 854 return on_ready_.Run(); // Can delete |this|. | 856 return on_ready_.Run(); // Can delete |this|. |
| (...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2379 blink::WebConsoleMessage::kLevelWarning, message)); | 2381 blink::WebConsoleMessage::kLevelWarning, message)); |
| 2380 return false; | 2382 return false; |
| 2381 } | 2383 } |
| 2382 | 2384 |
| 2383 void PrintWebViewHelper::ScriptingThrottler::Reset() { | 2385 void PrintWebViewHelper::ScriptingThrottler::Reset() { |
| 2384 // Reset counter on successful print. | 2386 // Reset counter on successful print. |
| 2385 count_ = 0; | 2387 count_ = 0; |
| 2386 } | 2388 } |
| 2387 | 2389 |
| 2388 } // namespace printing | 2390 } // namespace printing |
| OLD | NEW |