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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2651883008: Make content::FeaturePolicy implement WebFeaturePolicy, and use it in blink code (Closed)
Patch Set: Duplicate FP object rather than modifying in-place Created 3 years, 9 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
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/browser/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 3333 matching lines...) Expand 10 before | Expand all | Expand 10 after
3344 return web_bluetooth_service == service.get(); 3344 return web_bluetooth_service == service.get();
3345 }); 3345 });
3346 DCHECK(it != web_bluetooth_services_.end()); 3346 DCHECK(it != web_bluetooth_services_.end());
3347 web_bluetooth_services_.erase(it); 3347 web_bluetooth_services_.erase(it);
3348 } 3348 }
3349 3349
3350 void RenderFrameHostImpl::ResetFeaturePolicy() { 3350 void RenderFrameHostImpl::ResetFeaturePolicy() {
3351 RenderFrameHostImpl* parent_frame_host = GetParent(); 3351 RenderFrameHostImpl* parent_frame_host = GetParent();
3352 const FeaturePolicy* parent_policy = 3352 const FeaturePolicy* parent_policy =
3353 parent_frame_host ? parent_frame_host->get_feature_policy() : nullptr; 3353 parent_frame_host ? parent_frame_host->get_feature_policy() : nullptr;
3354 // TODO(iclelland): Get the frame owner properties here to reset properly.
3355 ParsedFeaturePolicyHeader container_policy;
3354 feature_policy_ = FeaturePolicy::CreateFromParentPolicy( 3356 feature_policy_ = FeaturePolicy::CreateFromParentPolicy(
3355 parent_policy, nullptr, last_committed_origin_); 3357 parent_policy, container_policy, last_committed_origin_);
3356 } 3358 }
3357 3359
3358 void RenderFrameHostImpl::Create( 3360 void RenderFrameHostImpl::Create(
3359 const service_manager::Identity& remote_identity, 3361 const service_manager::Identity& remote_identity,
3360 media::mojom::InterfaceFactoryRequest request) { 3362 media::mojom::InterfaceFactoryRequest request) {
3361 DCHECK(!media_interface_proxy_); 3363 DCHECK(!media_interface_proxy_);
3362 media_interface_proxy_.reset(new MediaInterfaceProxy( 3364 media_interface_proxy_.reset(new MediaInterfaceProxy(
3363 this, std::move(request), 3365 this, std::move(request),
3364 base::Bind(&RenderFrameHostImpl::OnMediaInterfaceFactoryConnectionError, 3366 base::Bind(&RenderFrameHostImpl::OnMediaInterfaceFactoryConnectionError,
3365 base::Unretained(this)))); 3367 base::Unretained(this))));
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
3460 // There is no pending NavigationEntry in these cases, so pass 0 as the 3462 // There is no pending NavigationEntry in these cases, so pass 0 as the
3461 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3463 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3462 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3464 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3463 return NavigationHandleImpl::Create( 3465 return NavigationHandleImpl::Create(
3464 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3466 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3465 params.was_within_same_page, base::TimeTicks::Now(), 3467 params.was_within_same_page, base::TimeTicks::Now(),
3466 entry_id_for_data_nav, false); // started_from_context_menu 3468 entry_id_for_data_nav, false); // started_from_context_menu
3467 } 3469 }
3468 3470
3469 } // namespace content 3471 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698