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

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

Issue 2156883002: Use content::FrameOwnerProperties instead of blink::WebFrameOwnerProperties in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-delegation-frame-owner-properties
Patch Set: Use this everywhere Created 4 years, 5 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "content/public/common/browser_side_navigation_policy.h" 76 #include "content/public/common/browser_side_navigation_policy.h"
77 #include "content/public/common/content_constants.h" 77 #include "content/public/common/content_constants.h"
78 #include "content/public/common/content_switches.h" 78 #include "content/public/common/content_switches.h"
79 #include "content/public/common/file_chooser_file_info.h" 79 #include "content/public/common/file_chooser_file_info.h"
80 #include "content/public/common/file_chooser_params.h" 80 #include "content/public/common/file_chooser_params.h"
81 #include "content/public/common/isolated_world_ids.h" 81 #include "content/public/common/isolated_world_ids.h"
82 #include "content/public/common/url_constants.h" 82 #include "content/public/common/url_constants.h"
83 #include "content/public/common/url_utils.h" 83 #include "content/public/common/url_utils.h"
84 #include "device/vibration/vibration_manager_impl.h" 84 #include "device/vibration/vibration_manager_impl.h"
85 #include "services/shell/public/cpp/interface_provider.h" 85 #include "services/shell/public/cpp/interface_provider.h"
86 #include "third_party/WebKit/public/web/WebFrameOwnerProperties.h"
87 #include "ui/accessibility/ax_tree.h" 86 #include "ui/accessibility/ax_tree.h"
88 #include "ui/accessibility/ax_tree_update.h" 87 #include "ui/accessibility/ax_tree_update.h"
89 #include "ui/gfx/geometry/quad_f.h" 88 #include "ui/gfx/geometry/quad_f.h"
90 #include "url/gurl.h" 89 #include "url/gurl.h"
91 90
92 #if defined(OS_ANDROID) 91 #if defined(OS_ANDROID)
93 #include "content/browser/mojo/service_registrar_android.h" 92 #include "content/browser/mojo/service_registrar_android.h"
94 #endif 93 #endif
95 94
96 #if defined(OS_MACOSX) 95 #if defined(OS_MACOSX)
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 << ")"; 898 << ")";
900 } 899 }
901 } 900 }
902 901
903 void RenderFrameHostImpl::OnCreateChildFrame( 902 void RenderFrameHostImpl::OnCreateChildFrame(
904 int new_routing_id, 903 int new_routing_id,
905 blink::WebTreeScopeType scope, 904 blink::WebTreeScopeType scope,
906 const std::string& frame_name, 905 const std::string& frame_name,
907 const std::string& frame_unique_name, 906 const std::string& frame_unique_name,
908 blink::WebSandboxFlags sandbox_flags, 907 blink::WebSandboxFlags sandbox_flags,
909 const blink::WebFrameOwnerProperties& frame_owner_properties) { 908 const FrameOwnerProperties& frame_owner_properties) {
910 // TODO(lukasza): Call ReceivedBadMessage when |frame_unique_name| is empty. 909 // TODO(lukasza): Call ReceivedBadMessage when |frame_unique_name| is empty.
911 DCHECK(!frame_unique_name.empty()); 910 DCHECK(!frame_unique_name.empty());
912 911
913 // It is possible that while a new RenderFrameHost was committed, the 912 // It is possible that while a new RenderFrameHost was committed, the
914 // RenderFrame corresponding to this host sent an IPC message to create a 913 // RenderFrame corresponding to this host sent an IPC message to create a
915 // frame and it is delivered after this host is swapped out. 914 // frame and it is delivered after this host is swapped out.
916 // Ignore such messages, as we know this RenderFrameHost is going away. 915 // Ignore such messages, as we know this RenderFrameHost is going away.
917 if (!is_active() || frame_tree_node_->current_frame_host() != this) 916 if (!is_active() || frame_tree_node_->current_frame_host() != this)
918 return; 917 return;
919 918
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 } 1659 }
1661 1660
1662 void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties( 1661 void RenderFrameHostImpl::OnDidChangeFrameOwnerProperties(
1663 int32_t frame_routing_id, 1662 int32_t frame_routing_id,
1664 const FrameOwnerProperties& properties) { 1663 const FrameOwnerProperties& properties) {
1665 FrameTreeNode* child = FindAndVerifyChild( 1664 FrameTreeNode* child = FindAndVerifyChild(
1666 frame_routing_id, bad_message::RFH_OWNER_PROPERTY); 1665 frame_routing_id, bad_message::RFH_OWNER_PROPERTY);
1667 if (!child) 1666 if (!child)
1668 return; 1667 return;
1669 1668
1670 blink::WebFrameOwnerProperties web_properties = 1669 child->set_frame_owner_properties(properties);
1671 properties.ToWebFrameOwnerProperties();
1672 1670
1673 child->set_frame_owner_properties(web_properties); 1671 child->render_manager()->OnDidUpdateFrameOwnerProperties(properties);
1674
1675 child->render_manager()->OnDidUpdateFrameOwnerProperties(web_properties);
1676 } 1672 }
1677 1673
1678 void RenderFrameHostImpl::OnUpdateTitle( 1674 void RenderFrameHostImpl::OnUpdateTitle(
1679 const base::string16& title, 1675 const base::string16& title,
1680 blink::WebTextDirection title_direction) { 1676 blink::WebTextDirection title_direction) {
1681 // This message should only be sent for top-level frames. 1677 // This message should only be sent for top-level frames.
1682 if (frame_tree_node_->parent()) 1678 if (frame_tree_node_->parent())
1683 return; 1679 return;
1684 1680
1685 if (title.length() > kMaxTitleChars) { 1681 if (title.length() > kMaxTitleChars) {
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
2974 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2970 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2975 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2971 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2976 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2972 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2977 } 2973 }
2978 2974
2979 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2975 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2980 web_bluetooth_service_.reset(); 2976 web_bluetooth_service_.reset();
2981 } 2977 }
2982 2978
2983 } // namespace content 2979 } // 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