| 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" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include "content/browser/geolocation/geolocation_service_context.h" | 33 #include "content/browser/geolocation/geolocation_service_context.h" |
| 34 #include "content/browser/permissions/permission_service_context.h" | 34 #include "content/browser/permissions/permission_service_context.h" |
| 35 #include "content/browser/permissions/permission_service_impl.h" | 35 #include "content/browser/permissions/permission_service_impl.h" |
| 36 #include "content/browser/presentation/presentation_service_impl.h" | 36 #include "content/browser/presentation/presentation_service_impl.h" |
| 37 #include "content/browser/renderer_host/input/input_router.h" | 37 #include "content/browser/renderer_host/input/input_router.h" |
| 38 #include "content/browser/renderer_host/input/timeout_monitor.h" | 38 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 39 #include "content/browser/renderer_host/render_process_host_impl.h" | 39 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 40 #include "content/browser/renderer_host/render_view_host_delegate.h" | 40 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 41 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 41 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 42 #include "content/browser/renderer_host/render_view_host_impl.h" | 42 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 43 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 43 #include "content/browser/renderer_host/render_widget_host_impl.h" | 44 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 44 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 45 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 45 #include "content/browser/wake_lock/wake_lock_service_context.h" | 46 #include "content/browser/wake_lock/wake_lock_service_context.h" |
| 46 #include "content/common/accessibility_messages.h" | 47 #include "content/common/accessibility_messages.h" |
| 47 #include "content/common/frame_messages.h" | 48 #include "content/common/frame_messages.h" |
| 48 #include "content/common/input_messages.h" | 49 #include "content/common/input_messages.h" |
| 49 #include "content/common/inter_process_time_ticks_converter.h" | 50 #include "content/common/inter_process_time_ticks_converter.h" |
| 50 #include "content/common/navigation_params.h" | 51 #include "content/common/navigation_params.h" |
| 51 #include "content/common/render_frame_setup.mojom.h" | 52 #include "content/common/render_frame_setup.mojom.h" |
| 52 #include "content/common/site_isolation_policy.h" | 53 #include "content/common/site_isolation_policy.h" |
| (...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 FrameHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, | 1889 FrameHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, |
| 1889 success, user_input); | 1890 success, user_input); |
| 1890 Send(reply_msg); | 1891 Send(reply_msg); |
| 1891 | 1892 |
| 1892 // If we are waiting for an unload or beforeunload ack and the user has | 1893 // If we are waiting for an unload or beforeunload ack and the user has |
| 1893 // suppressed messages, kill the tab immediately; a page that's spamming | 1894 // suppressed messages, kill the tab immediately; a page that's spamming |
| 1894 // alerts in onbeforeunload is presumably malicious, so there's no point in | 1895 // alerts in onbeforeunload is presumably malicious, so there's no point in |
| 1895 // continuing to run its script and dragging out the process. | 1896 // continuing to run its script and dragging out the process. |
| 1896 // This must be done after sending the reply since RenderView can't close | 1897 // This must be done after sending the reply since RenderView can't close |
| 1897 // correctly while waiting for a response. | 1898 // correctly while waiting for a response. |
| 1898 if (is_waiting && dialog_was_suppressed) | 1899 if (is_waiting && dialog_was_suppressed) { |
| 1899 render_view_host_->delegate_->RendererUnresponsive(render_view_host_); | 1900 render_view_host_->GetWidget()->delegate()->RendererUnresponsive( |
| 1901 render_view_host_->GetWidget()); |
| 1902 } |
| 1900 } | 1903 } |
| 1901 | 1904 |
| 1902 // PlzNavigate | 1905 // PlzNavigate |
| 1903 void RenderFrameHostImpl::CommitNavigation( | 1906 void RenderFrameHostImpl::CommitNavigation( |
| 1904 ResourceResponse* response, | 1907 ResourceResponse* response, |
| 1905 scoped_ptr<StreamHandle> body, | 1908 scoped_ptr<StreamHandle> body, |
| 1906 const CommonNavigationParams& common_params, | 1909 const CommonNavigationParams& common_params, |
| 1907 const RequestNavigationParams& request_params) { | 1910 const RequestNavigationParams& request_params) { |
| 1908 DCHECK((response && body.get()) || | 1911 DCHECK((response && body.get()) || |
| 1909 !ShouldMakeNetworkRequestForURL(common_params.url)); | 1912 !ShouldMakeNetworkRequestForURL(common_params.url)); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2306 *dst = src; | 2309 *dst = src; |
| 2307 | 2310 |
| 2308 if (src.routing_id != -1) | 2311 if (src.routing_id != -1) |
| 2309 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2312 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
| 2310 | 2313 |
| 2311 if (src.parent_routing_id != -1) | 2314 if (src.parent_routing_id != -1) |
| 2312 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2315 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
| 2313 } | 2316 } |
| 2314 | 2317 |
| 2315 } // namespace content | 2318 } // namespace content |
| OLD | NEW |