| 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/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
| 12 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
| 13 #include "base/metrics/histogram.h" | 13 #include "base/metrics/histogram.h" |
| 14 #include "base/process/kill.h" | 14 #include "base/process/kill.h" |
| 15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
| 16 #include "content/browser/accessibility/accessibility_mode_helper.h" | 16 #include "content/browser/accessibility/accessibility_mode_helper.h" |
| 17 #include "content/browser/accessibility/ax_tree_id_registry.h" | 17 #include "content/browser/accessibility/ax_tree_id_registry.h" |
| 18 #include "content/browser/accessibility/browser_accessibility_manager.h" | 18 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 19 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 19 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 20 #include "content/browser/child_process_security_policy_impl.h" | 20 #include "content/browser/child_process_security_policy_impl.h" |
| 21 #include "content/browser/child_process_security_policy_impl.h" | 21 #include "content/browser/child_process_security_policy_impl.h" |
| 22 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 22 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 23 #include "content/browser/download/mhtml_generation_manager.h" |
| 23 #include "content/browser/frame_host/cross_process_frame_connector.h" | 24 #include "content/browser/frame_host/cross_process_frame_connector.h" |
| 24 #include "content/browser/frame_host/cross_site_transferring_request.h" | 25 #include "content/browser/frame_host/cross_site_transferring_request.h" |
| 25 #include "content/browser/frame_host/frame_mojo_shell.h" | 26 #include "content/browser/frame_host/frame_mojo_shell.h" |
| 26 #include "content/browser/frame_host/frame_tree.h" | 27 #include "content/browser/frame_host/frame_tree.h" |
| 27 #include "content/browser/frame_host/frame_tree_node.h" | 28 #include "content/browser/frame_host/frame_tree_node.h" |
| 28 #include "content/browser/frame_host/navigation_handle_impl.h" | 29 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 29 #include "content/browser/frame_host/navigation_request.h" | 30 #include "content/browser/frame_host/navigation_request.h" |
| 30 #include "content/browser/frame_host/navigator.h" | 31 #include "content/browser/frame_host/navigator.h" |
| 31 #include "content/browser/frame_host/navigator_impl.h" | 32 #include "content/browser/frame_host/navigator_impl.h" |
| 32 #include "content/browser/frame_host/render_frame_host_delegate.h" | 33 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 OnAccessibilityLocationChanges) | 535 OnAccessibilityLocationChanges) |
| 535 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, | 536 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_FindInPageResult, |
| 536 OnAccessibilityFindInPageResult) | 537 OnAccessibilityFindInPageResult) |
| 537 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_SnapshotResponse, | 538 IPC_MESSAGE_HANDLER(AccessibilityHostMsg_SnapshotResponse, |
| 538 OnAccessibilitySnapshotResponse) | 539 OnAccessibilitySnapshotResponse) |
| 539 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen) | 540 IPC_MESSAGE_HANDLER(FrameHostMsg_ToggleFullscreen, OnToggleFullscreen) |
| 540 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) | 541 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStartLoading, OnDidStartLoading) |
| 541 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) | 542 IPC_MESSAGE_HANDLER(FrameHostMsg_DidStopLoading, OnDidStopLoading) |
| 542 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, | 543 IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeLoadProgress, |
| 543 OnDidChangeLoadProgress) | 544 OnDidChangeLoadProgress) |
| 545 IPC_MESSAGE_HANDLER(FrameHostMsg_SerializeAsMHTMLResponse, |
| 546 OnSerializeAsMHTMLResponse) |
| 544 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 547 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 545 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) | 548 IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) |
| 546 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) | 549 IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) |
| 547 #endif | 550 #endif |
| 548 IPC_END_MESSAGE_MAP() | 551 IPC_END_MESSAGE_MAP() |
| 549 | 552 |
| 550 // No further actions here, since we may have been deleted. | 553 // No further actions here, since we may have been deleted. |
| 551 return handled; | 554 return handled; |
| 552 } | 555 } |
| 553 | 556 |
| (...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 | 1700 |
| 1698 is_loading_ = false; | 1701 is_loading_ = false; |
| 1699 frame_tree_node_->DidStopLoading(); | 1702 frame_tree_node_->DidStopLoading(); |
| 1700 navigation_handle_.reset(); | 1703 navigation_handle_.reset(); |
| 1701 } | 1704 } |
| 1702 | 1705 |
| 1703 void RenderFrameHostImpl::OnDidChangeLoadProgress(double load_progress) { | 1706 void RenderFrameHostImpl::OnDidChangeLoadProgress(double load_progress) { |
| 1704 frame_tree_node_->DidChangeLoadProgress(load_progress); | 1707 frame_tree_node_->DidChangeLoadProgress(load_progress); |
| 1705 } | 1708 } |
| 1706 | 1709 |
| 1710 void RenderFrameHostImpl::OnSerializeAsMHTMLResponse(int job_id, bool success) { |
| 1711 MHTMLGenerationManager::GetInstance()->OnSavedPageAsMHTML(job_id, success); |
| 1712 } |
| 1713 |
| 1707 #if defined(OS_MACOSX) || defined(OS_ANDROID) | 1714 #if defined(OS_MACOSX) || defined(OS_ANDROID) |
| 1708 void RenderFrameHostImpl::OnShowPopup( | 1715 void RenderFrameHostImpl::OnShowPopup( |
| 1709 const FrameHostMsg_ShowPopup_Params& params) { | 1716 const FrameHostMsg_ShowPopup_Params& params) { |
| 1710 RenderViewHostDelegateView* view = | 1717 RenderViewHostDelegateView* view = |
| 1711 render_view_host_->delegate_->GetDelegateView(); | 1718 render_view_host_->delegate_->GetDelegateView(); |
| 1712 if (view) { | 1719 if (view) { |
| 1713 view->ShowPopupMenu(this, | 1720 view->ShowPopupMenu(this, |
| 1714 params.bounds, | 1721 params.bounds, |
| 1715 params.item_height, | 1722 params.item_height, |
| 1716 params.item_font_size, | 1723 params.item_font_size, |
| (...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 *dst = src; | 2510 *dst = src; |
| 2504 | 2511 |
| 2505 if (src.routing_id != -1) | 2512 if (src.routing_id != -1) |
| 2506 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); | 2513 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); |
| 2507 | 2514 |
| 2508 if (src.parent_routing_id != -1) | 2515 if (src.parent_routing_id != -1) |
| 2509 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); | 2516 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); |
| 2510 } | 2517 } |
| 2511 | 2518 |
| 2512 } // namespace content | 2519 } // namespace content |
| OLD | NEW |