Chromium Code Reviews| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| 11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 12 #include "base/process/kill.h" | 12 #include "base/process/kill.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/browser/accessibility/accessibility_mode_helper.h" | 14 #include "content/browser/accessibility/accessibility_mode_helper.h" |
| 15 #include "content/browser/accessibility/ax_tree_id_registry.h" | 15 #include "content/browser/accessibility/ax_tree_id_registry.h" |
| 16 #include "content/browser/accessibility/browser_accessibility_manager.h" | 16 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 17 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 17 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 18 #include "content/browser/bad_message.h" | 18 #include "content/browser/bad_message.h" |
| 19 #include "content/browser/child_process_security_policy_impl.h" | 19 #include "content/browser/child_process_security_policy_impl.h" |
| 20 #include "content/browser/frame_host/cross_process_frame_connector.h" | 20 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 21 #include "content/browser/frame_host/cross_site_transferring_request.h" | 21 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| 22 #include "content/browser/frame_host/frame_mojo_shell.h" | 22 #include "content/browser/frame_host/frame_mojo_shell.h" |
| 23 #include "content/browser/frame_host/frame_tree.h" | 23 #include "content/browser/frame_host/frame_tree.h" |
| 24 #include "content/browser/frame_host/frame_tree_node.h" | 24 #include "content/browser/frame_host/frame_tree_node.h" |
| 25 #include "content/browser/frame_host/navigation_handle_factory.h" | |
| 25 #include "content/browser/frame_host/navigation_handle_impl.h" | 26 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 26 #include "content/browser/frame_host/navigation_request.h" | 27 #include "content/browser/frame_host/navigation_request.h" |
| 27 #include "content/browser/frame_host/navigator.h" | 28 #include "content/browser/frame_host/navigator.h" |
| 28 #include "content/browser/frame_host/navigator_impl.h" | 29 #include "content/browser/frame_host/navigator_impl.h" |
| 29 #include "content/browser/frame_host/render_frame_host_delegate.h" | 30 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| 30 #include "content/browser/frame_host/render_frame_proxy_host.h" | 31 #include "content/browser/frame_host/render_frame_proxy_host.h" |
| 31 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 32 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 32 #include "content/browser/geolocation/geolocation_service_context.h" | 33 #include "content/browser/geolocation/geolocation_service_context.h" |
| 33 #include "content/browser/permissions/permission_service_context.h" | 34 #include "content/browser/permissions/permission_service_context.h" |
| 34 #include "content/browser/permissions/permission_service_impl.h" | 35 #include "content/browser/permissions/permission_service_impl.h" |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 900 // navigation. | 901 // navigation. |
| 901 if (navigation_handle_ && | 902 if (navigation_handle_ && |
| 902 navigation_handle_->GetURL() != validated_params.url) { | 903 navigation_handle_->GetURL() != validated_params.url) { |
| 903 navigation_handle_.reset(); | 904 navigation_handle_.reset(); |
| 904 } | 905 } |
| 905 | 906 |
| 906 // Synchronous renderer-initiated navigations will send a | 907 // Synchronous renderer-initiated navigations will send a |
| 907 // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad | 908 // DidCommitProvisionalLoad IPC without a prior DidStartProvisionalLoad |
| 908 // message. | 909 // message. |
| 909 if (!navigation_handle_) { | 910 if (!navigation_handle_) { |
| 910 navigation_handle_ = NavigationHandleImpl::Create( | 911 GURL filtered_url = validated_params.url; |
| 911 validated_params.url, frame_tree_node_->IsMainFrame(), | 912 GetProcess()->FilterURL(false, &filtered_url); |
|
nasko
2015/09/14 22:00:04
This is already done on line 881, why do we need o
clamy
2015/09/16 01:03:21
Done.
| |
| 913 navigation_handle_ = NavigationHandleFactory::Create( | |
| 914 validated_params.url, filtered_url, frame_tree_node_->IsMainFrame(), | |
| 912 frame_tree_node_->navigator()->GetDelegate()); | 915 frame_tree_node_->navigator()->GetDelegate()); |
| 913 } | 916 } |
| 914 | 917 |
| 915 accessibility_reset_count_ = 0; | 918 accessibility_reset_count_ = 0; |
| 916 frame_tree_node()->navigator()->DidNavigate(this, validated_params); | 919 frame_tree_node()->navigator()->DidNavigate(this, validated_params); |
| 917 | 920 |
| 918 // PlzNavigate | 921 // PlzNavigate |
| 919 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 922 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 920 switches::kEnableBrowserSideNavigation)) { | 923 switches::kEnableBrowserSideNavigation)) { |
| 921 pending_commit_ = false; | 924 pending_commit_ = false; |
| (...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2225 BrowserPluginInstanceIDToAXTreeID(value))); | 2228 BrowserPluginInstanceIDToAXTreeID(value))); |
| 2226 break; | 2229 break; |
| 2227 case AX_CONTENT_INT_ATTRIBUTE_LAST: | 2230 case AX_CONTENT_INT_ATTRIBUTE_LAST: |
| 2228 NOTREACHED(); | 2231 NOTREACHED(); |
| 2229 break; | 2232 break; |
| 2230 } | 2233 } |
| 2231 } | 2234 } |
| 2232 } | 2235 } |
| 2233 | 2236 |
| 2234 } // namespace content | 2237 } // namespace content |
| OLD | NEW |