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

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

Issue 1957783002: Replicate Content-Security-Policy into remote frame proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from dcheng@. Created 4 years, 7 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse, 512 IPC_MESSAGE_HANDLER(FrameHostMsg_VisualStateResponse,
513 OnVisualStateResponse) 513 OnVisualStateResponse)
514 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage, 514 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunJavaScriptMessage,
515 OnRunJavaScriptMessage) 515 OnRunJavaScriptMessage)
516 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm, 516 IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm,
517 OnRunBeforeUnloadConfirm) 517 OnRunBeforeUnloadConfirm)
518 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument, 518 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
519 OnDidAccessInitialDocument) 519 OnDidAccessInitialDocument)
520 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) 520 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener)
521 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName) 521 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeName, OnDidChangeName)
522 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAddContentSecurityPolicy,
523 OnDidAddContentSecurityPolicy)
522 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking, 524 IPC_MESSAGE_HANDLER(FrameHostMsg_EnforceStrictMixedContentChecking,
523 OnEnforceStrictMixedContentChecking) 525 OnEnforceStrictMixedContentChecking)
524 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin, 526 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateToUniqueOrigin,
525 OnUpdateToUniqueOrigin) 527 OnUpdateToUniqueOrigin)
526 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId) 528 IPC_MESSAGE_HANDLER(FrameHostMsg_DidAssignPageId, OnDidAssignPageId)
527 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags, 529 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeSandboxFlags,
528 OnDidChangeSandboxFlags) 530 OnDidChangeSandboxFlags)
529 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties, 531 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeFrameOwnerProperties,
530 OnDidChangeFrameOwnerProperties) 532 OnDidChangeFrameOwnerProperties)
531 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle) 533 IPC_MESSAGE_HANDLER(FrameHostMsg_UpdateTitle, OnUpdateTitle)
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 DCHECK(!unique_name.empty()); 1500 DCHECK(!unique_name.empty());
1499 } 1501 }
1500 1502
1501 std::string old_name = frame_tree_node()->frame_name(); 1503 std::string old_name = frame_tree_node()->frame_name();
1502 frame_tree_node()->SetFrameName(name, unique_name); 1504 frame_tree_node()->SetFrameName(name, unique_name);
1503 if (old_name.empty() && !name.empty()) 1505 if (old_name.empty() && !name.empty())
1504 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame(); 1506 frame_tree_node_->render_manager()->CreateProxiesForNewNamedFrame();
1505 delegate_->DidChangeName(this, name); 1507 delegate_->DidChangeName(this, name);
1506 } 1508 }
1507 1509
1510 void RenderFrameHostImpl::OnDidAddContentSecurityPolicy(
1511 const ContentSecurityPolicyHeader& header) {
1512 frame_tree_node()->AddContentSecurityPolicy(header);
1513 }
1514
1508 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() { 1515 void RenderFrameHostImpl::OnEnforceStrictMixedContentChecking() {
1509 frame_tree_node()->SetEnforceStrictMixedContentChecking(true); 1516 frame_tree_node()->SetEnforceStrictMixedContentChecking(true);
1510 } 1517 }
1511 1518
1512 void RenderFrameHostImpl::OnUpdateToUniqueOrigin( 1519 void RenderFrameHostImpl::OnUpdateToUniqueOrigin(
1513 bool is_potentially_trustworthy_unique_origin) { 1520 bool is_potentially_trustworthy_unique_origin) {
1514 url::Origin origin; 1521 url::Origin origin;
1515 DCHECK(origin.unique()); 1522 DCHECK(origin.unique());
1516 frame_tree_node()->SetCurrentOrigin(origin, 1523 frame_tree_node()->SetCurrentOrigin(origin,
1517 is_potentially_trustworthy_unique_origin); 1524 is_potentially_trustworthy_unique_origin);
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after
2764 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2771 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2765 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2772 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2766 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2773 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2767 } 2774 }
2768 2775
2769 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2776 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2770 web_bluetooth_service_.reset(); 2777 web_bluetooth_service_.reset();
2771 } 2778 }
2772 2779
2773 } // namespace content 2780 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/frame_host/render_frame_host_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698