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

Unified Diff: chrome/browser/download/save_package_file_picker.cc

Issue 9030032: Get rid of a bunch of tab_contents.h includes from chrome. These are all trivial changes to use W... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/extensions/execute_code_in_tab_function.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_package_file_picker.cc
===================================================================
--- chrome/browser/download/save_package_file_picker.cc (revision 116331)
+++ chrome/browser/download/save_package_file_picker.cc (working copy)
@@ -12,11 +12,13 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "content/browser/download/save_package.h"
-#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
+using content::WebContents;
+
namespace {
// If false, we don't prompt the user as to where to save the file. This
@@ -120,16 +122,16 @@
if (g_should_prompt_for_filename) {
select_file_dialog_ = SelectFileDialog::Create(this);
- TabContents* tab_contents = save_package_->tab_contents();
+ WebContents* web_contents = save_package_->web_contents();
select_file_dialog_->SelectFile(SelectFileDialog::SELECT_SAVEAS_FILE,
string16(),
suggested_path,
&file_type_info,
file_type_index,
default_extension,
- tab_contents,
+ web_contents,
platform_util::GetTopLevel(
- tab_contents->GetNativeView()),
+ web_contents->GetNativeView()),
NULL);
} else {
// Just use 'suggested_path' instead of opening the dialog prompt.
@@ -153,10 +155,10 @@
index <= kSelectFileCompleteIndex);
if (save_package_) {
- TabContents* tab_contents = save_package_->tab_contents();
+ WebContents* web_contents = save_package_->web_contents();
SavePackage::SavePackageType save_type = kIndexToSaveType[index];
Profile* profile =
- Profile::FromBrowserContext(tab_contents->GetBrowserContext());
+ Profile::FromBrowserContext(web_contents->GetBrowserContext());
PrefService* prefs = profile->GetPrefs();
if (select_file_dialog_ &&
select_file_dialog_->HasMultipleFileTypeChoices())
@@ -171,7 +173,7 @@
#endif
// If user change the default saving directory, we will remember it just
// like IE and FireFox.
- if (!tab_contents->GetBrowserContext()->IsOffTheRecord() &&
+ if (!web_contents->GetBrowserContext()->IsOffTheRecord() &&
save_file_path.GetValue() != path_string) {
save_file_path.SetValue(path_string);
}
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/extensions/execute_code_in_tab_function.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698