| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2964 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2960 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
| 2965 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2961 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
| 2966 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2962 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
| 2967 } | 2963 } |
| 2968 | 2964 |
| 2969 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2965 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
| 2970 web_bluetooth_service_.reset(); | 2966 web_bluetooth_service_.reset(); |
| 2971 } | 2967 } |
| 2972 | 2968 |
| 2973 } // namespace content | 2969 } // namespace content |
| OLD | NEW |