| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/download/mhtml_generation_manager.h" | 5 #include "content/browser/download/mhtml_generation_manager.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <queue> | 8 #include <queue> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 MhtmlSaveStatus MHTMLGenerationManager::Job::SendToNextRenderFrame() { | 246 MhtmlSaveStatus MHTMLGenerationManager::Job::SendToNextRenderFrame() { |
| 247 DCHECK(browser_file_.IsValid()); | 247 DCHECK(browser_file_.IsValid()); |
| 248 DCHECK(!pending_frame_tree_node_ids_.empty()); | 248 DCHECK(!pending_frame_tree_node_ids_.empty()); |
| 249 | 249 |
| 250 FrameMsg_SerializeAsMHTML_Params ipc_params; | 250 FrameMsg_SerializeAsMHTML_Params ipc_params; |
| 251 ipc_params.job_id = job_id_; | 251 ipc_params.job_id = job_id_; |
| 252 ipc_params.mhtml_boundary_marker = mhtml_boundary_marker_; | 252 ipc_params.mhtml_boundary_marker = mhtml_boundary_marker_; |
| 253 ipc_params.mhtml_binary_encoding = params_.use_binary_encoding; | 253 ipc_params.mhtml_binary_encoding = params_.use_binary_encoding; |
| 254 ipc_params.mhtml_cache_control_policy = params_.cache_control_policy; | 254 ipc_params.mhtml_cache_control_policy = params_.cache_control_policy; |
| 255 ipc_params.mhtml_popup_overlay_removal = params_.remove_popup_overlay; | 255 ipc_params.mhtml_popup_overlay_removal = params_.remove_popup_overlay; |
| 256 ipc_params.mhtml_problem_detection = params_.use_page_problem_detectors; |
| 256 | 257 |
| 257 int frame_tree_node_id = pending_frame_tree_node_ids_.front(); | 258 int frame_tree_node_id = pending_frame_tree_node_ids_.front(); |
| 258 pending_frame_tree_node_ids_.pop(); | 259 pending_frame_tree_node_ids_.pop(); |
| 259 | 260 |
| 260 FrameTreeNode* ftn = FrameTreeNode::GloballyFindByID(frame_tree_node_id); | 261 FrameTreeNode* ftn = FrameTreeNode::GloballyFindByID(frame_tree_node_id); |
| 261 if (!ftn) // The contents went away. | 262 if (!ftn) // The contents went away. |
| 262 return MhtmlSaveStatus::FRAME_NO_LONGER_EXISTS; | 263 return MhtmlSaveStatus::FRAME_NO_LONGER_EXISTS; |
| 263 RenderFrameHost* rfh = ftn->current_frame_host(); | 264 RenderFrameHost* rfh = ftn->current_frame_host(); |
| 264 | 265 |
| 265 // Get notified if the target of the IPC message dies between responding. | 266 // Get notified if the target of the IPC message dies between responding. |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 return iter->second.get(); | 691 return iter->second.get(); |
| 691 } | 692 } |
| 692 | 693 |
| 693 void MHTMLGenerationManager::RenderProcessExited(Job* job) { | 694 void MHTMLGenerationManager::RenderProcessExited(Job* job) { |
| 694 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 695 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 695 DCHECK(job); | 696 DCHECK(job); |
| 696 JobFinished(job, MhtmlSaveStatus::RENDER_PROCESS_EXITED); | 697 JobFinished(job, MhtmlSaveStatus::RENDER_PROCESS_EXITED); |
| 697 } | 698 } |
| 698 | 699 |
| 699 } // namespace content | 700 } // namespace content |
| OLD | NEW |