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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2648423002: Rename feature policy classes. (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 #else 867 #else
868 return true; 868 return true;
869 #endif 869 #endif
870 } 870 }
871 #endif // defined(ENABLE_MOJO_CDM) 871 #endif // defined(ENABLE_MOJO_CDM)
872 872
873 double ConvertToBlinkTime(const base::TimeTicks& time_ticks) { 873 double ConvertToBlinkTime(const base::TimeTicks& time_ticks) {
874 return (time_ticks - base::TimeTicks()).InSecondsF(); 874 return (time_ticks - base::TimeTicks()).InSecondsF();
875 } 875 }
876 876
877 ParsedFeaturePolicy ToParsedFeaturePolicy( 877 ParsedFeaturePolicyHeader ToParsedFeaturePolicyHeader(
878 const blink::WebParsedFeaturePolicy& web_parsed_whitelists) { 878 const blink::WebParsedFeaturePolicyHeader& parsed_header) {
879 ParsedFeaturePolicy result; 879 ParsedFeaturePolicyHeader result;
880 for (const blink::WebFeaturePolicy::ParsedWhitelist& web_whitelist : 880 for (const blink::WebParsedFeaturePolicyDeclaration& web_declaration :
881 web_parsed_whitelists) { 881 parsed_header) {
882 FeaturePolicyParsedWhitelist whitelist; 882 ParsedFeaturePolicyDeclaration declaration;
883 whitelist.feature_name = web_whitelist.featureName.utf8(); 883 declaration.feature_name = web_declaration.featureName.utf8();
884 whitelist.matches_all_origins = web_whitelist.matchesAllOrigins; 884 declaration.matches_all_origins = web_declaration.matchesAllOrigins;
885 for (const blink::WebSecurityOrigin& web_origin : web_whitelist.origins) 885 for (const blink::WebSecurityOrigin& web_origin : web_declaration.origins)
886 whitelist.origins.push_back(web_origin); 886 declaration.origins.push_back(web_origin);
887 result.push_back(whitelist); 887 result.push_back(declaration);
888 } 888 }
889 return result; 889 return result;
890 } 890 }
891 891
892 } // namespace 892 } // namespace
893 893
894 struct RenderFrameImpl::PendingFileChooser { 894 struct RenderFrameImpl::PendingFileChooser {
895 PendingFileChooser(const FileChooserParams& p, 895 PendingFileChooser(const FileChooserParams& p,
896 blink::WebFileChooserCompletion* c) 896 blink::WebFileChooserCompletion* c)
897 : params(p), completion(c) {} 897 : params(p), completion(c) {}
(...skipping 2291 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 routing_id_, is_potentially_trustworthy_unique_origin)); 3189 routing_id_, is_potentially_trustworthy_unique_origin));
3190 } 3190 }
3191 3191
3192 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame, 3192 void RenderFrameImpl::didChangeSandboxFlags(blink::WebFrame* child_frame,
3193 blink::WebSandboxFlags flags) { 3193 blink::WebSandboxFlags flags) {
3194 Send(new FrameHostMsg_DidChangeSandboxFlags( 3194 Send(new FrameHostMsg_DidChangeSandboxFlags(
3195 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags)); 3195 routing_id_, GetRoutingIdForFrameOrProxy(child_frame), flags));
3196 } 3196 }
3197 3197
3198 void RenderFrameImpl::didSetFeaturePolicyHeader( 3198 void RenderFrameImpl::didSetFeaturePolicyHeader(
3199 const blink::WebParsedFeaturePolicy& parsed_header) { 3199 const blink::WebParsedFeaturePolicyHeader& parsed_header) {
3200 Send(new FrameHostMsg_DidSetFeaturePolicyHeader( 3200 Send(new FrameHostMsg_DidSetFeaturePolicyHeader(
3201 routing_id_, ToParsedFeaturePolicy(parsed_header))); 3201 routing_id_, ToParsedFeaturePolicyHeader(parsed_header)));
3202 } 3202 }
3203 3203
3204 void RenderFrameImpl::didAddContentSecurityPolicy( 3204 void RenderFrameImpl::didAddContentSecurityPolicy(
3205 const blink::WebString& header_value, 3205 const blink::WebString& header_value,
3206 blink::WebContentSecurityPolicyType type, 3206 blink::WebContentSecurityPolicyType type,
3207 blink::WebContentSecurityPolicySource source) { 3207 blink::WebContentSecurityPolicySource source) {
3208 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible()) 3208 if (!SiteIsolationPolicy::AreCrossProcessFramesPossible())
3209 return; 3209 return;
3210 3210
3211 ContentSecurityPolicyHeader header; 3211 ContentSecurityPolicyHeader header;
(...skipping 3664 matching lines...) Expand 10 before | Expand all | Expand 10 after
6876 // event target. Potentially a Pepper plugin will receive the event. 6876 // event target. Potentially a Pepper plugin will receive the event.
6877 // In order to tell whether a plugin gets the last mouse event and which it 6877 // In order to tell whether a plugin gets the last mouse event and which it
6878 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6878 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6879 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6879 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6880 // |pepper_last_mouse_event_target_|. 6880 // |pepper_last_mouse_event_target_|.
6881 pepper_last_mouse_event_target_ = nullptr; 6881 pepper_last_mouse_event_target_ = nullptr;
6882 #endif 6882 #endif
6883 } 6883 }
6884 6884
6885 } // namespace content 6885 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/render_frame_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698