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/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "content/browser/frame_host/frame_tree.h" | 27 #include "content/browser/frame_host/frame_tree.h" |
28 #include "content/browser/frame_host/frame_tree_node.h" | 28 #include "content/browser/frame_host/frame_tree_node.h" |
29 #include "content/browser/frame_host/navigation_handle_impl.h" | 29 #include "content/browser/frame_host/navigation_handle_impl.h" |
30 #include "content/browser/frame_host/navigation_request.h" | 30 #include "content/browser/frame_host/navigation_request.h" |
31 #include "content/browser/frame_host/navigator.h" | 31 #include "content/browser/frame_host/navigator.h" |
32 #include "content/browser/frame_host/navigator_impl.h" | 32 #include "content/browser/frame_host/navigator_impl.h" |
33 #include "content/browser/frame_host/render_frame_host_delegate.h" | 33 #include "content/browser/frame_host/render_frame_host_delegate.h" |
34 #include "content/browser/frame_host/render_frame_proxy_host.h" | 34 #include "content/browser/frame_host/render_frame_proxy_host.h" |
35 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" | 35 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
36 #include "content/browser/geolocation/geolocation_service_context.h" | 36 #include "content/browser/geolocation/geolocation_service_context.h" |
| 37 #include "content/browser/loader/resource_dispatcher_host_impl.h" |
37 #include "content/browser/permissions/permission_service_context.h" | 38 #include "content/browser/permissions/permission_service_context.h" |
38 #include "content/browser/permissions/permission_service_impl.h" | 39 #include "content/browser/permissions/permission_service_impl.h" |
39 #include "content/browser/presentation/presentation_service_impl.h" | 40 #include "content/browser/presentation/presentation_service_impl.h" |
40 #include "content/browser/renderer_host/input/input_router.h" | 41 #include "content/browser/renderer_host/input/input_router.h" |
41 #include "content/browser/renderer_host/input/timeout_monitor.h" | 42 #include "content/browser/renderer_host/input/timeout_monitor.h" |
42 #include "content/browser/renderer_host/render_process_host_impl.h" | 43 #include "content/browser/renderer_host/render_process_host_impl.h" |
43 #include "content/browser/renderer_host/render_view_host_delegate.h" | 44 #include "content/browser/renderer_host/render_view_host_delegate.h" |
44 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 45 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
45 #include "content/browser/renderer_host/render_view_host_impl.h" | 46 #include "content/browser/renderer_host/render_view_host_impl.h" |
46 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 47 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
47 #include "content/browser/renderer_host/render_widget_host_impl.h" | 48 #include "content/browser/renderer_host/render_widget_host_impl.h" |
48 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 49 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
49 #include "content/browser/wake_lock/wake_lock_service_context.h" | 50 #include "content/browser/wake_lock/wake_lock_service_context.h" |
50 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 51 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
51 #include "content/common/accessibility_messages.h" | 52 #include "content/common/accessibility_messages.h" |
52 #include "content/common/frame_messages.h" | 53 #include "content/common/frame_messages.h" |
53 #include "content/common/input_messages.h" | 54 #include "content/common/input_messages.h" |
54 #include "content/common/inter_process_time_ticks_converter.h" | 55 #include "content/common/inter_process_time_ticks_converter.h" |
55 #include "content/common/navigation_params.h" | 56 #include "content/common/navigation_params.h" |
56 #include "content/common/render_frame_setup.mojom.h" | 57 #include "content/common/render_frame_setup.mojom.h" |
57 #include "content/common/site_isolation_policy.h" | 58 #include "content/common/site_isolation_policy.h" |
58 #include "content/common/swapped_out_messages.h" | 59 #include "content/common/swapped_out_messages.h" |
59 #include "content/public/browser/ax_event_notification_details.h" | 60 #include "content/public/browser/ax_event_notification_details.h" |
60 #include "content/public/browser/browser_accessibility_state.h" | 61 #include "content/public/browser/browser_accessibility_state.h" |
61 #include "content/public/browser/browser_context.h" | 62 #include "content/public/browser/browser_context.h" |
62 #include "content/public/browser/browser_plugin_guest_manager.h" | 63 #include "content/public/browser/browser_plugin_guest_manager.h" |
63 #include "content/public/browser/browser_thread.h" | 64 #include "content/public/browser/browser_thread.h" |
64 #include "content/public/browser/content_browser_client.h" | 65 #include "content/public/browser/content_browser_client.h" |
| 66 #include "content/public/browser/loader_io_thread_notifier.h" |
65 #include "content/public/browser/permission_manager.h" | 67 #include "content/public/browser/permission_manager.h" |
66 #include "content/public/browser/permission_type.h" | 68 #include "content/public/browser/permission_type.h" |
67 #include "content/public/browser/render_process_host.h" | 69 #include "content/public/browser/render_process_host.h" |
68 #include "content/public/browser/render_widget_host_view.h" | 70 #include "content/public/browser/render_widget_host_view.h" |
69 #include "content/public/browser/stream_handle.h" | 71 #include "content/public/browser/stream_handle.h" |
70 #include "content/public/browser/user_metrics.h" | 72 #include "content/public/browser/user_metrics.h" |
71 #include "content/public/common/browser_side_navigation_policy.h" | 73 #include "content/public/common/browser_side_navigation_policy.h" |
72 #include "content/public/common/content_constants.h" | 74 #include "content/public/common/content_constants.h" |
73 #include "content/public/common/isolated_world_ids.h" | 75 #include "content/public/common/isolated_world_ids.h" |
74 #include "content/public/common/url_constants.h" | 76 #include "content/public/common/url_constants.h" |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 delegate_->RenderFrameCreated(this); | 760 delegate_->RenderFrameCreated(this); |
759 else | 761 else |
760 delegate_->RenderFrameDeleted(this); | 762 delegate_->RenderFrameDeleted(this); |
761 } | 763 } |
762 | 764 |
763 if (created && render_widget_host_) | 765 if (created && render_widget_host_) |
764 render_widget_host_->InitForFrame(); | 766 render_widget_host_->InitForFrame(); |
765 } | 767 } |
766 | 768 |
767 void RenderFrameHostImpl::Init() { | 769 void RenderFrameHostImpl::Init() { |
768 // TODO(csharrison): Call GetProcess()->ResumeRequestsForFrame(routing_id_) | 770 LoaderIOThreadNotifier::ResumeBlockedRequestsForFrame(this); |
769 // once ResourceDispatcherHostImpl is keyed on render frame routing ids | |
770 // instead of render view routing ids. | |
771 } | 771 } |
772 | 772 |
773 void RenderFrameHostImpl::OnAddMessageToConsole( | 773 void RenderFrameHostImpl::OnAddMessageToConsole( |
774 int32_t level, | 774 int32_t level, |
775 const base::string16& message, | 775 const base::string16& message, |
776 int32_t line_no, | 776 int32_t line_no, |
777 const base::string16& source_id) { | 777 const base::string16& source_id) { |
778 if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) | 778 if (delegate_->AddMessageToConsole(level, message, line_no, source_id)) |
779 return; | 779 return; |
780 | 780 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1056 while (frame) { | 1056 while (frame) { |
1057 if (frame->render_widget_host_) | 1057 if (frame->render_widget_host_) |
1058 return frame->render_widget_host_->GetView(); | 1058 return frame->render_widget_host_->GetView(); |
1059 frame = static_cast<RenderFrameHostImpl*>(frame->GetParent()); | 1059 frame = static_cast<RenderFrameHostImpl*>(frame->GetParent()); |
1060 } | 1060 } |
1061 | 1061 |
1062 NOTREACHED(); | 1062 NOTREACHED(); |
1063 return nullptr; | 1063 return nullptr; |
1064 } | 1064 } |
1065 | 1065 |
| 1066 GlobalFrameRoutingId RenderFrameHostImpl::GetGlobalFrameRoutingId() { |
| 1067 return GlobalFrameRoutingId(GetProcess()->GetID(), GetRoutingID()); |
| 1068 } |
| 1069 |
1066 int RenderFrameHostImpl::GetEnabledBindings() { | 1070 int RenderFrameHostImpl::GetEnabledBindings() { |
1067 return render_view_host_->GetEnabledBindings(); | 1071 return render_view_host_->GetEnabledBindings(); |
1068 } | 1072 } |
1069 | 1073 |
1070 void RenderFrameHostImpl::SetNavigationHandle( | 1074 void RenderFrameHostImpl::SetNavigationHandle( |
1071 scoped_ptr<NavigationHandleImpl> navigation_handle) { | 1075 scoped_ptr<NavigationHandleImpl> navigation_handle) { |
1072 navigation_handle_ = std::move(navigation_handle); | 1076 navigation_handle_ = std::move(navigation_handle); |
1073 if (navigation_handle_) | 1077 if (navigation_handle_) |
1074 navigation_handle_->set_render_frame_host(this); | 1078 navigation_handle_->set_render_frame_host(this); |
1075 } | 1079 } |
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2524 *dst = src; | 2528 *dst = src; |
2525 | 2529 |
2526 if (src.routing_id != -1) | 2530 if (src.routing_id != -1) |
2527 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2531 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
2528 | 2532 |
2529 if (src.parent_routing_id != -1) | 2533 if (src.parent_routing_id != -1) |
2530 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2534 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
2531 } | 2535 } |
2532 | 2536 |
2533 } // namespace content | 2537 } // namespace content |
OLD | NEW |