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

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

Issue 22920005: Refactor MHTMLGenerator to allow getting sending the data to a file descriptor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation Created 7 years, 3 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
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/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 params->set_post_id(post_id); 1922 params->set_post_id(post_id);
1923 params->set_prefer_cache(true); 1923 params->set_prefer_cache(true);
1924 if (post_id >= 0) 1924 if (post_id >= 0)
1925 params->set_method("POST"); 1925 params->set_method("POST");
1926 params->set_prompt(true); 1926 params->set_prompt(true);
1927 dlm->DownloadUrl(params.Pass()); 1927 dlm->DownloadUrl(params.Pass());
1928 } 1928 }
1929 1929
1930 void WebContentsImpl::GenerateMHTML( 1930 void WebContentsImpl::GenerateMHTML(
1931 const base::FilePath& file, 1931 const base::FilePath& file,
1932 const base::Callback<void(const base::FilePath&, int64)>& callback) { 1932 const base::Callback<void(int64)>& callback) {
1933 MHTMLGenerationManager::GetInstance()->GenerateMHTML(this, file, callback); 1933 MHTMLGenerationManager::GetInstance()->SaveMHTML(this, file, callback);
1934 } 1934 }
1935 1935
1936 bool WebContentsImpl::IsActiveEntry(int32 page_id) { 1936 bool WebContentsImpl::IsActiveEntry(int32 page_id) {
1937 NavigationEntryImpl* active_entry = 1937 NavigationEntryImpl* active_entry =
1938 NavigationEntryImpl::FromNavigationEntry(controller_.GetActiveEntry()); 1938 NavigationEntryImpl::FromNavigationEntry(controller_.GetActiveEntry());
1939 return (active_entry != NULL && 1939 return (active_entry != NULL &&
1940 active_entry->site_instance() == GetSiteInstance() && 1940 active_entry->site_instance() == GetSiteInstance() &&
1941 active_entry->GetPageID() == page_id); 1941 active_entry->GetPageID() == page_id);
1942 } 1942 }
1943 1943
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
3745 } 3745 }
3746 3746
3747 void WebContentsImpl::ClearAllPowerSaveBlockers() { 3747 void WebContentsImpl::ClearAllPowerSaveBlockers() {
3748 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin()); 3748 for (PowerSaveBlockerMap::iterator i(power_save_blockers_.begin());
3749 i != power_save_blockers_.end(); ++i) 3749 i != power_save_blockers_.end(); ++i)
3750 STLDeleteValues(&power_save_blockers_[i->first]); 3750 STLDeleteValues(&power_save_blockers_[i->first]);
3751 power_save_blockers_.clear(); 3751 power_save_blockers_.clear();
3752 } 3752 }
3753 3753
3754 } // namespace content 3754 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698