| 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 664 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 675   // layerTreeView. | 675   // layerTreeView. | 
| 676   bool allowsBrokenNullLayerTreeView() const override; | 676   bool allowsBrokenNullLayerTreeView() const override; | 
| 677 | 677 | 
| 678   // blink::WebFrameClient: | 678   // blink::WebFrameClient: | 
| 679   blink::WebLocalFrame* createChildFrame( | 679   blink::WebLocalFrame* createChildFrame( | 
| 680       blink::WebLocalFrame* parent, | 680       blink::WebLocalFrame* parent, | 
| 681       blink::WebTreeScopeType scope, | 681       blink::WebTreeScopeType scope, | 
| 682       const blink::WebString& name, | 682       const blink::WebString& name, | 
| 683       const blink::WebString& fallback_name, | 683       const blink::WebString& fallback_name, | 
| 684       blink::WebSandboxFlags sandbox_flags, | 684       blink::WebSandboxFlags sandbox_flags, | 
|  | 685       const blink::WebParsedFeaturePolicy& container_policy, | 
| 685       const blink::WebFrameOwnerProperties& frame_owner_properties) override; | 686       const blink::WebFrameOwnerProperties& frame_owner_properties) override; | 
| 686 | 687 | 
| 687   void CallOnReady(); | 688   void CallOnReady(); | 
| 688   void ResizeForPrinting(); | 689   void ResizeForPrinting(); | 
| 689   void RestoreSize(); | 690   void RestoreSize(); | 
| 690   void CopySelection(const WebPreferences& preferences); | 691   void CopySelection(const WebPreferences& preferences); | 
| 691 | 692 | 
| 692   FrameReference frame_; | 693   FrameReference frame_; | 
| 693   blink::WebNode node_to_print_; | 694   blink::WebNode node_to_print_; | 
| 694   bool owns_web_view_; | 695   bool owns_web_view_; | 
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 834       FROM_HERE, base::Bind(&PrepareFrameAndViewForPrint::CallOnReady, | 835       FROM_HERE, base::Bind(&PrepareFrameAndViewForPrint::CallOnReady, | 
| 835                             weak_ptr_factory_.GetWeakPtr())); | 836                             weak_ptr_factory_.GetWeakPtr())); | 
| 836 } | 837 } | 
| 837 | 838 | 
| 838 blink::WebLocalFrame* PrepareFrameAndViewForPrint::createChildFrame( | 839 blink::WebLocalFrame* PrepareFrameAndViewForPrint::createChildFrame( | 
| 839     blink::WebLocalFrame* parent, | 840     blink::WebLocalFrame* parent, | 
| 840     blink::WebTreeScopeType scope, | 841     blink::WebTreeScopeType scope, | 
| 841     const blink::WebString& name, | 842     const blink::WebString& name, | 
| 842     const blink::WebString& fallback_name, | 843     const blink::WebString& fallback_name, | 
| 843     blink::WebSandboxFlags sandbox_flags, | 844     blink::WebSandboxFlags sandbox_flags, | 
|  | 845     const blink::WebParsedFeaturePolicy& container_policy, | 
| 844     const blink::WebFrameOwnerProperties& frame_owner_properties) { | 846     const blink::WebFrameOwnerProperties& frame_owner_properties) { | 
| 845   blink::WebLocalFrame* frame = | 847   blink::WebLocalFrame* frame = | 
| 846       blink::WebLocalFrame::create(scope, this, nullptr, nullptr); | 848       blink::WebLocalFrame::create(scope, this, nullptr, nullptr); | 
| 847   parent->appendChild(frame); | 849   parent->appendChild(frame); | 
| 848   return frame; | 850   return frame; | 
| 849 } | 851 } | 
| 850 | 852 | 
| 851 void PrepareFrameAndViewForPrint::CallOnReady() { | 853 void PrepareFrameAndViewForPrint::CallOnReady() { | 
| 852   return on_ready_.Run();  // Can delete |this|. | 854   return on_ready_.Run();  // Can delete |this|. | 
| 853 } | 855 } | 
| (...skipping 1514 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2368       blink::WebConsoleMessage::LevelWarning, message)); | 2370       blink::WebConsoleMessage::LevelWarning, message)); | 
| 2369   return false; | 2371   return false; | 
| 2370 } | 2372 } | 
| 2371 | 2373 | 
| 2372 void PrintWebViewHelper::ScriptingThrottler::Reset() { | 2374 void PrintWebViewHelper::ScriptingThrottler::Reset() { | 
| 2373   // Reset counter on successful print. | 2375   // Reset counter on successful print. | 
| 2374   count_ = 0; | 2376   count_ = 0; | 
| 2375 } | 2377 } | 
| 2376 | 2378 | 
| 2377 }  // namespace printing | 2379 }  // namespace printing | 
| OLD | NEW | 
|---|