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

Side by Side Diff: components/printing/renderer/print_web_view_helper.cc

Issue 2797813002: Replicate feature policy container policies. (Closed)
Patch Set: Addressing review comments Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 // layerTreeView. 671 // layerTreeView.
672 bool AllowsBrokenNullLayerTreeView() const override; 672 bool AllowsBrokenNullLayerTreeView() const override;
673 673
674 // blink::WebFrameClient: 674 // blink::WebFrameClient:
675 blink::WebLocalFrame* CreateChildFrame( 675 blink::WebLocalFrame* CreateChildFrame(
676 blink::WebLocalFrame* parent, 676 blink::WebLocalFrame* parent,
677 blink::WebTreeScopeType scope, 677 blink::WebTreeScopeType scope,
678 const blink::WebString& name, 678 const blink::WebString& name,
679 const blink::WebString& fallback_name, 679 const blink::WebString& fallback_name,
680 blink::WebSandboxFlags sandbox_flags, 680 blink::WebSandboxFlags sandbox_flags,
681 const blink::WebParsedFeaturePolicy& container_policy,
681 const blink::WebFrameOwnerProperties& frame_owner_properties) override; 682 const blink::WebFrameOwnerProperties& frame_owner_properties) override;
682 683
683 void CallOnReady(); 684 void CallOnReady();
684 void ResizeForPrinting(); 685 void ResizeForPrinting();
685 void RestoreSize(); 686 void RestoreSize();
686 void CopySelection(const WebPreferences& preferences); 687 void CopySelection(const WebPreferences& preferences);
687 688
688 FrameReference frame_; 689 FrameReference frame_;
689 blink::WebNode node_to_print_; 690 blink::WebNode node_to_print_;
690 bool owns_web_view_; 691 bool owns_web_view_;
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 FROM_HERE, base::Bind(&PrepareFrameAndViewForPrint::CallOnReady, 831 FROM_HERE, base::Bind(&PrepareFrameAndViewForPrint::CallOnReady,
831 weak_ptr_factory_.GetWeakPtr())); 832 weak_ptr_factory_.GetWeakPtr()));
832 } 833 }
833 834
834 blink::WebLocalFrame* PrepareFrameAndViewForPrint::CreateChildFrame( 835 blink::WebLocalFrame* PrepareFrameAndViewForPrint::CreateChildFrame(
835 blink::WebLocalFrame* parent, 836 blink::WebLocalFrame* parent,
836 blink::WebTreeScopeType scope, 837 blink::WebTreeScopeType scope,
837 const blink::WebString& name, 838 const blink::WebString& name,
838 const blink::WebString& fallback_name, 839 const blink::WebString& fallback_name,
839 blink::WebSandboxFlags sandbox_flags, 840 blink::WebSandboxFlags sandbox_flags,
841 const blink::WebParsedFeaturePolicy& container_policy,
840 const blink::WebFrameOwnerProperties& frame_owner_properties) { 842 const blink::WebFrameOwnerProperties& frame_owner_properties) {
841 blink::WebLocalFrame* frame = 843 blink::WebLocalFrame* frame =
842 blink::WebLocalFrame::Create(scope, this, nullptr, nullptr); 844 blink::WebLocalFrame::Create(scope, this, nullptr, nullptr);
843 parent->AppendChild(frame); 845 parent->AppendChild(frame);
844 return frame; 846 return frame;
845 } 847 }
846 848
847 void PrepareFrameAndViewForPrint::CallOnReady() { 849 void PrepareFrameAndViewForPrint::CallOnReady() {
848 return on_ready_.Run(); // Can delete |this|. 850 return on_ready_.Run(); // Can delete |this|.
849 } 851 }
(...skipping 1516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2366 blink::WebConsoleMessage::kLevelWarning, message)); 2368 blink::WebConsoleMessage::kLevelWarning, message));
2367 return false; 2369 return false;
2368 } 2370 }
2369 2371
2370 void PrintWebViewHelper::ScriptingThrottler::Reset() { 2372 void PrintWebViewHelper::ScriptingThrottler::Reset() {
2371 // Reset counter on successful print. 2373 // Reset counter on successful print.
2372 count_ = 0; 2374 count_ = 0;
2373 } 2375 }
2374 2376
2375 } // namespace printing 2377 } // namespace printing
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/frame_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698