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 21 matching lines...) Expand all Loading... |
32 #include "content/browser/geolocation/geolocation_service_context.h" | 32 #include "content/browser/geolocation/geolocation_service_context.h" |
33 #include "content/browser/permissions/permission_service_context.h" | 33 #include "content/browser/permissions/permission_service_context.h" |
34 #include "content/browser/permissions/permission_service_impl.h" | 34 #include "content/browser/permissions/permission_service_impl.h" |
35 #include "content/browser/presentation/presentation_service_impl.h" | 35 #include "content/browser/presentation/presentation_service_impl.h" |
36 #include "content/browser/renderer_host/input/input_router.h" | 36 #include "content/browser/renderer_host/input/input_router.h" |
37 #include "content/browser/renderer_host/input/timeout_monitor.h" | 37 #include "content/browser/renderer_host/input/timeout_monitor.h" |
38 #include "content/browser/renderer_host/render_process_host_impl.h" | 38 #include "content/browser/renderer_host/render_process_host_impl.h" |
39 #include "content/browser/renderer_host/render_view_host_delegate.h" | 39 #include "content/browser/renderer_host/render_view_host_delegate.h" |
40 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 40 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
41 #include "content/browser/renderer_host/render_view_host_impl.h" | 41 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 42 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
42 #include "content/browser/renderer_host/render_widget_host_impl.h" | 43 #include "content/browser/renderer_host/render_widget_host_impl.h" |
43 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 44 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
44 #include "content/browser/wake_lock/wake_lock_service_context.h" | 45 #include "content/browser/wake_lock/wake_lock_service_context.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" |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1934 FrameHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, | 1935 FrameHostMsg_RunJavaScriptMessage::WriteReplyParams(reply_msg, |
1935 success, user_input); | 1936 success, user_input); |
1936 Send(reply_msg); | 1937 Send(reply_msg); |
1937 | 1938 |
1938 // If we are waiting for an unload or beforeunload ack and the user has | 1939 // If we are waiting for an unload or beforeunload ack and the user has |
1939 // suppressed messages, kill the tab immediately; a page that's spamming | 1940 // suppressed messages, kill the tab immediately; a page that's spamming |
1940 // alerts in onbeforeunload is presumably malicious, so there's no point in | 1941 // alerts in onbeforeunload is presumably malicious, so there's no point in |
1941 // continuing to run its script and dragging out the process. | 1942 // continuing to run its script and dragging out the process. |
1942 // This must be done after sending the reply since RenderView can't close | 1943 // This must be done after sending the reply since RenderView can't close |
1943 // correctly while waiting for a response. | 1944 // correctly while waiting for a response. |
1944 if (is_waiting && dialog_was_suppressed) | 1945 if (is_waiting && dialog_was_suppressed) { |
1945 render_view_host_->delegate_->RendererUnresponsive(render_view_host_); | 1946 render_view_host_->GetWidget()->delegate()->RendererUnresponsive( |
| 1947 render_view_host_->GetWidget()); |
| 1948 } |
1946 } | 1949 } |
1947 | 1950 |
1948 // PlzNavigate | 1951 // PlzNavigate |
1949 void RenderFrameHostImpl::CommitNavigation( | 1952 void RenderFrameHostImpl::CommitNavigation( |
1950 ResourceResponse* response, | 1953 ResourceResponse* response, |
1951 scoped_ptr<StreamHandle> body, | 1954 scoped_ptr<StreamHandle> body, |
1952 const CommonNavigationParams& common_params, | 1955 const CommonNavigationParams& common_params, |
1953 const RequestNavigationParams& request_params) { | 1956 const RequestNavigationParams& request_params) { |
1954 DCHECK((response && body.get()) || | 1957 DCHECK((response && body.get()) || |
1955 !ShouldMakeNetworkRequestForURL(common_params.url)); | 1958 !ShouldMakeNetworkRequestForURL(common_params.url)); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2354 *dst = src; | 2357 *dst = src; |
2355 | 2358 |
2356 if (src.routing_id != -1) | 2359 if (src.routing_id != -1) |
2357 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2360 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2358 | 2361 |
2359 if (src.parent_routing_id != -1) | 2362 if (src.parent_routing_id != -1) |
2360 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2363 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2361 } | 2364 } |
2362 | 2365 |
2363 } // namespace content | 2366 } // namespace content |
OLD | NEW |