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

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

Issue 2655663004: Introduce content-side Feature Policy object and maintain in parallel with renderer policy. (Closed)
Patch Set: Move FeaturePolicy to RenderFrameHostImpl 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
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 3344 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 auto it = std::find_if( 3355 auto it = std::find_if(
3356 web_bluetooth_services_.begin(), web_bluetooth_services_.end(), 3356 web_bluetooth_services_.begin(), web_bluetooth_services_.end(),
3357 [web_bluetooth_service]( 3357 [web_bluetooth_service](
3358 const std::unique_ptr<WebBluetoothServiceImpl>& service) { 3358 const std::unique_ptr<WebBluetoothServiceImpl>& service) {
3359 return web_bluetooth_service == service.get(); 3359 return web_bluetooth_service == service.get();
3360 }); 3360 });
3361 DCHECK(it != web_bluetooth_services_.end()); 3361 DCHECK(it != web_bluetooth_services_.end());
3362 web_bluetooth_services_.erase(it); 3362 web_bluetooth_services_.erase(it);
3363 } 3363 }
3364 3364
3365 void RenderFrameHostImpl::SetFeaturePolicy(
3366 std::unique_ptr<FeaturePolicy> feature_policy) {
3367 feature_policy_ = std::move(feature_policy);
3368 }
3369
3370 FeaturePolicy* RenderFrameHostImpl::GetFeaturePolicy() {
3371 return feature_policy_.get();
3372 }
3373
3365 void RenderFrameHostImpl::Create( 3374 void RenderFrameHostImpl::Create(
3366 const service_manager::Identity& remote_identity, 3375 const service_manager::Identity& remote_identity,
3367 media::mojom::InterfaceFactoryRequest request) { 3376 media::mojom::InterfaceFactoryRequest request) {
3368 DCHECK(!media_interface_proxy_); 3377 DCHECK(!media_interface_proxy_);
3369 media_interface_proxy_.reset(new MediaInterfaceProxy( 3378 media_interface_proxy_.reset(new MediaInterfaceProxy(
3370 this, std::move(request), 3379 this, std::move(request),
3371 base::Bind(&RenderFrameHostImpl::OnMediaInterfaceFactoryConnectionError, 3380 base::Bind(&RenderFrameHostImpl::OnMediaInterfaceFactoryConnectionError,
3372 base::Unretained(this)))); 3381 base::Unretained(this))));
3373 } 3382 }
3374 3383
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3455 // There is no pending NavigationEntry in these cases, so pass 0 as the 3464 // There is no pending NavigationEntry in these cases, so pass 0 as the
3456 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3465 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3457 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3466 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3458 return NavigationHandleImpl::Create( 3467 return NavigationHandleImpl::Create(
3459 params.url, frame_tree_node_, is_renderer_initiated, 3468 params.url, frame_tree_node_, is_renderer_initiated,
3460 params.was_within_same_page, base::TimeTicks::Now(), 3469 params.was_within_same_page, base::TimeTicks::Now(),
3461 entry_id_for_data_nav, false); // started_from_context_menu 3470 entry_id_for_data_nav, false); // started_from_context_menu
3462 } 3471 }
3463 3472
3464 } // namespace content 3473 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698