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/common/accessibility_messages.h" | 46 #include "content/common/accessibility_messages.h" |
46 #include "content/common/frame_messages.h" | 47 #include "content/common/frame_messages.h" |
47 #include "content/common/input_messages.h" | 48 #include "content/common/input_messages.h" |
48 #include "content/common/inter_process_time_ticks_converter.h" | 49 #include "content/common/inter_process_time_ticks_converter.h" |
49 #include "content/common/navigation_params.h" | 50 #include "content/common/navigation_params.h" |
50 #include "content/common/render_frame_setup.mojom.h" | 51 #include "content/common/render_frame_setup.mojom.h" |
51 #include "content/common/site_isolation_policy.h" | 52 #include "content/common/site_isolation_policy.h" |
52 #include "content/common/swapped_out_messages.h" | 53 #include "content/common/swapped_out_messages.h" |
(...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1875 FrameHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, | 1876 FrameHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, |
1876 success, user_input); | 1877 success, user_input); |
1877 Send(reply_msg); | 1878 Send(reply_msg); |
1878 | 1879 |
1879 // If we are waiting for an unload or beforeunload ack and the user has | 1880 // If we are waiting for an unload or beforeunload ack and the user has |
1880 // suppressed messages, kill the tab immediately; a page that's spamming | 1881 // suppressed messages, kill the tab immediately; a page that's spamming |
1881 // alerts in onbeforeunload is presumably malicious, so there's no point in | 1882 // alerts in onbeforeunload is presumably malicious, so there's no point in |
1882 // continuing to run its script and dragging out the process. | 1883 // continuing to run its script and dragging out the process. |
1883 // This must be done after sending the reply since RenderView can't close | 1884 // This must be done after sending the reply since RenderView can't close |
1884 // correctly while waiting for a response. | 1885 // correctly while waiting for a response. |
1885 if (is_waiting && dialog_was_suppressed) | 1886 if (is_waiting && dialog_was_suppressed) { |
1886 render_view_host_->delegate_->RendererUnresponsive(render_view_host_); | 1887 render_view_host_->GetWidget()->delegate()->RendererUnresponsive( |
| 1888 render_view_host_->GetWidget()); |
| 1889 } |
1887 } | 1890 } |
1888 | 1891 |
1889 // PlzNavigate | 1892 // PlzNavigate |
1890 void RenderFrameHostImpl::CommitNavigation( | 1893 void RenderFrameHostImpl::CommitNavigation( |
1891 ResourceResponse* response, | 1894 ResourceResponse* response, |
1892 scoped_ptr<StreamHandle> body, | 1895 scoped_ptr<StreamHandle> body, |
1893 const CommonNavigationParams& common_params, | 1896 const CommonNavigationParams& common_params, |
1894 const RequestNavigationParams& request_params) { | 1897 const RequestNavigationParams& request_params) { |
1895 DCHECK((response && body.get()) || | 1898 DCHECK((response && body.get()) || |
1896 !ShouldMakeNetworkRequestForURL(common_params.url)); | 1899 !ShouldMakeNetworkRequestForURL(common_params.url)); |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2293 *dst = src; | 2296 *dst = src; |
2294 | 2297 |
2295 if (src.routing_id != -1) | 2298 if (src.routing_id != -1) |
2296 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2299 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2297 | 2300 |
2298 if (src.parent_routing_id != -1) | 2301 if (src.parent_routing_id != -1) |
2299 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2302 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2300 } | 2303 } |
2301 | 2304 |
2302 } // namespace content | 2305 } // namespace content |
OLD | NEW |