Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1386873003: OOPIFs: Transitioning MHTML generation from view-oriented to frame-oriented. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-generation-mgr-cleanup
Patch Set: Rebasing... Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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(
1711 int job_id,
1712 bool success,
1713 const std::string& mhtml_boundary_marker) {
1714 MHTMLGenerationManager::GetInstance()->OnSavedPageAsMHTML(
1715 job_id, success, mhtml_boundary_marker);
1716 }
1717
1707 #if defined(OS_MACOSX) || defined(OS_ANDROID) 1718 #if defined(OS_MACOSX) || defined(OS_ANDROID)
1708 void RenderFrameHostImpl::OnShowPopup( 1719 void RenderFrameHostImpl::OnShowPopup(
1709 const FrameHostMsg_ShowPopup_Params& params) { 1720 const FrameHostMsg_ShowPopup_Params& params) {
1710 RenderViewHostDelegateView* view = 1721 RenderViewHostDelegateView* view =
1711 render_view_host_->delegate_->GetDelegateView(); 1722 render_view_host_->delegate_->GetDelegateView();
1712 if (view) { 1723 if (view) {
1713 view->ShowPopupMenu(this, 1724 view->ShowPopupMenu(this,
1714 params.bounds, 1725 params.bounds,
1715 params.item_height, 1726 params.item_height,
1716 params.item_font_size, 1727 params.item_font_size,
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2503 *dst = src; 2514 *dst = src;
2504 2515
2505 if (src.routing_id != -1) 2516 if (src.routing_id != -1)
2506 dst->tree_id = RoutingIDToAXTreeID(src.routing_id); 2517 dst->tree_id = RoutingIDToAXTreeID(src.routing_id);
2507 2518
2508 if (src.parent_routing_id != -1) 2519 if (src.parent_routing_id != -1)
2509 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id); 2520 dst->parent_tree_id = RoutingIDToAXTreeID(src.parent_routing_id);
2510 } 2521 }
2511 2522
2512 } // namespace content 2523 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698