| 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 | 202 |
| 203 MhtmlSaveStatus MHTMLGenerationManager::Job::SendToNextRenderFrame() { | 203 MhtmlSaveStatus MHTMLGenerationManager::Job::SendToNextRenderFrame() { |
| 204 DCHECK(browser_file_.IsValid()); | 204 DCHECK(browser_file_.IsValid()); |
| 205 DCHECK(!pending_frame_tree_node_ids_.empty()); | 205 DCHECK(!pending_frame_tree_node_ids_.empty()); |
| 206 | 206 |
| 207 FrameMsg_SerializeAsMHTML_Params ipc_params; | 207 FrameMsg_SerializeAsMHTML_Params ipc_params; |
| 208 ipc_params.job_id = job_id_; | 208 ipc_params.job_id = job_id_; |
| 209 ipc_params.mhtml_boundary_marker = mhtml_boundary_marker_; | 209 ipc_params.mhtml_boundary_marker = mhtml_boundary_marker_; |
| 210 ipc_params.mhtml_binary_encoding = params_.use_binary_encoding; | 210 ipc_params.mhtml_binary_encoding = params_.use_binary_encoding; |
| 211 ipc_params.mhtml_cache_control_policy = params_.cache_control_policy; | 211 ipc_params.mhtml_cache_control_policy = params_.cache_control_policy; |
| 212 ipc_params.mhtml_popup_overlay_removal = params_.remove_popup_overlay; |
| 212 | 213 |
| 213 int frame_tree_node_id = pending_frame_tree_node_ids_.front(); | 214 int frame_tree_node_id = pending_frame_tree_node_ids_.front(); |
| 214 pending_frame_tree_node_ids_.pop(); | 215 pending_frame_tree_node_ids_.pop(); |
| 215 ipc_params.is_last_frame = pending_frame_tree_node_ids_.empty(); | 216 ipc_params.is_last_frame = pending_frame_tree_node_ids_.empty(); |
| 216 | 217 |
| 217 FrameTreeNode* ftn = FrameTreeNode::GloballyFindByID(frame_tree_node_id); | 218 FrameTreeNode* ftn = FrameTreeNode::GloballyFindByID(frame_tree_node_id); |
| 218 if (!ftn) // The contents went away. | 219 if (!ftn) // The contents went away. |
| 219 return MhtmlSaveStatus::FRAME_NO_LONGER_EXISTS; | 220 return MhtmlSaveStatus::FRAME_NO_LONGER_EXISTS; |
| 220 RenderFrameHost* rfh = ftn->current_frame_host(); | 221 RenderFrameHost* rfh = ftn->current_frame_host(); |
| 221 | 222 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 return iter->second.get(); | 545 return iter->second.get(); |
| 545 } | 546 } |
| 546 | 547 |
| 547 void MHTMLGenerationManager::RenderProcessExited(Job* job) { | 548 void MHTMLGenerationManager::RenderProcessExited(Job* job) { |
| 548 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 549 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 549 DCHECK(job); | 550 DCHECK(job); |
| 550 JobFinished(job, MhtmlSaveStatus::RENDER_PROCESS_EXITED); | 551 JobFinished(job, MhtmlSaveStatus::RENDER_PROCESS_EXITED); |
| 551 } | 552 } |
| 552 | 553 |
| 553 } // namespace content | 554 } // namespace content |
| OLD | NEW |