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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10069014: Save Page As MHTML (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 8 years, 7 months 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/public/browser/download_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 // Used in automated testing to bypass prompting the user for file names. 1229 // Used in automated testing to bypass prompting the user for file names.
1230 // Instead, the names and paths are hard coded rather than running them through 1230 // Instead, the names and paths are hard coded rather than running them through
1231 // file name sanitation and extension / mime checking. 1231 // file name sanitation and extension / mime checking.
1232 bool WebContentsImpl::SavePage(const FilePath& main_file, 1232 bool WebContentsImpl::SavePage(const FilePath& main_file,
1233 const FilePath& dir_path, 1233 const FilePath& dir_path,
1234 content::SavePageType save_type) { 1234 content::SavePageType save_type) {
1235 // Stop the page from navigating. 1235 // Stop the page from navigating.
1236 Stop(); 1236 Stop();
1237 1237
1238 save_package_ = new SavePackage(this, save_type, main_file, dir_path); 1238 save_package_ = new SavePackage(this, save_type, main_file, dir_path);
1239 return save_package_->Init(); 1239 return save_package_->Init(content::SavePackageDownloadCreatedCallback());
1240 } 1240 }
1241 1241
1242 void WebContentsImpl::GenerateMHTML( 1242 void WebContentsImpl::GenerateMHTML(
1243 const FilePath& file, 1243 const FilePath& file,
1244 const base::Callback<void(const FilePath&, int64)>& callback) { 1244 const base::Callback<void(const FilePath&, int64)>& callback) {
1245 MHTMLGenerationManager::GetInstance()->GenerateMHTML(this, file, callback); 1245 MHTMLGenerationManager::GetInstance()->GenerateMHTML(this, file, callback);
1246 } 1246 }
1247 1247
1248 bool WebContentsImpl::IsActiveEntry(int32 page_id) { 1248 bool WebContentsImpl::IsActiveEntry(int32 page_id) {
1249 NavigationEntryImpl* active_entry = 1249 NavigationEntryImpl* active_entry =
(...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
2699 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2699 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2700 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); 2700 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh);
2701 // Can be NULL during tests. 2701 // Can be NULL during tests.
2702 if (rwh_view) 2702 if (rwh_view)
2703 rwh_view->SetSize(GetView()->GetContainerSize()); 2703 rwh_view->SetSize(GetView()->GetContainerSize());
2704 } 2704 }
2705 2705
2706 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { 2706 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() {
2707 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); 2707 return static_cast<RenderViewHostImpl*>(GetRenderViewHost());
2708 } 2708 }
OLDNEW
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/public/browser/download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698