diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-26 06:09:06 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-26 06:09:06 +0000 |
commit | f3615f0a53ed81a0146c3ff2816ac8432b779cbf (patch) | |
tree | cb1565c101fc9c425c8d6848e9bbd4ea62d00078 /chrome/browser/download | |
parent | c9e49a0ce0b7e7d0cc4c447f1c81161d28dbfe07 (diff) | |
download | chromium_src-f3615f0a53ed81a0146c3ff2816ac8432b779cbf.zip chromium_src-f3615f0a53ed81a0146c3ff2816ac8432b779cbf.tar.gz chromium_src-f3615f0a53ed81a0146c3ff2816ac8432b779cbf.tar.bz2 |
Remove WebContents methods that duplicate WebContentsView methods.
Review URL: https://codereview.chromium.org/12334073
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184598 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
4 files changed, 25 insertions, 20 deletions
diff --git a/chrome/browser/download/download_file_picker.cc b/chrome/browser/download/download_file_picker.cc index 5b908e8..29a1573 100644 --- a/chrome/browser/download/download_file_picker.cc +++ b/chrome/browser/download/download_file_picker.cc @@ -11,6 +11,7 @@ #include "content/public/browser/download_item.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/web_contents.h" +#include "content/public/browser/web_contents_view.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -82,7 +83,8 @@ void DownloadFilePicker::Init( file_type_info.include_all_files = true; file_type_info.support_drive = true; gfx::NativeWindow owning_window = web_contents ? - platform_util::GetTopLevel(web_contents->GetNativeView()) : NULL; + platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()) : + NULL; select_file_dialog_->SelectFile( ui::SelectFileDialog::SELECT_SAVEAS_FILE, diff --git a/chrome/browser/download/download_shelf.cc b/chrome/browser/download/download_shelf.cc index 843a662..659bf6f 100644 --- a/chrome/browser/download/download_shelf.cc +++ b/chrome/browser/download/download_shelf.cc @@ -17,6 +17,7 @@ #include "content/public/browser/download_item.h" #include "content/public/browser/download_manager.h" #include "content/public/browser/web_contents.h" +#include "content/public/browser/web_contents_view.h" #include "ui/base/animation/animation.h" using content::DownloadItem; @@ -124,7 +125,7 @@ void DownloadShelf::ShowDownload(DownloadItem* download) { browser()->tab_strip_model()->GetActiveWebContents(); if (DownloadItemModel(download).ShouldShowDownloadStartedAnimation() && shelf_tab && - platform_util::IsVisible(shelf_tab->GetNativeView()) && + platform_util::IsVisible(shelf_tab->GetView()->GetNativeView()) && ui::Animation::ShouldRenderRichAnimation()) { DownloadStartedAnimation::Show(shelf_tab); } diff --git a/chrome/browser/download/save_package_file_picker.cc b/chrome/browser/download/save_package_file_picker.cc index 6ed710e..7844cfc 100644 --- a/chrome/browser/download/save_package_file_picker.cc +++ b/chrome/browser/download/save_package_file_picker.cc @@ -20,6 +20,7 @@ #include "content/public/browser/render_process_host.h" #include "content/public/browser/save_page_type.h" #include "content/public/browser/web_contents.h" +#include "content/public/browser/web_contents_view.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" @@ -159,15 +160,15 @@ SavePackageFilePicker::SavePackageFilePicker( if (g_should_prompt_for_filename) { select_file_dialog_ = ui::SelectFileDialog::Create( this, new ChromeSelectFilePolicy(web_contents)); - select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE, - string16(), - suggested_path, - &file_type_info, - file_type_index, - default_extension, - platform_util::GetTopLevel( - web_contents->GetNativeView()), - NULL); + select_file_dialog_->SelectFile( + ui::SelectFileDialog::SELECT_SAVEAS_FILE, + string16(), + suggested_path, + &file_type_info, + file_type_index, + default_extension, + platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()), + NULL); } else { // Just use 'suggested_path' instead of opening the dialog prompt. // Go through FileSelected() for consistency. diff --git a/chrome/browser/download/save_package_file_picker_chromeos.cc b/chrome/browser/download/save_package_file_picker_chromeos.cc index 0ab4692..f9f8ab1 100644 --- a/chrome/browser/download/save_package_file_picker_chromeos.cc +++ b/chrome/browser/download/save_package_file_picker_chromeos.cc @@ -15,6 +15,7 @@ #include "chrome/browser/ui/chrome_select_file_policy.h" #include "content/public/browser/download_item.h" #include "content/public/browser/web_contents.h" +#include "content/public/browser/web_contents_view.h" #include "ui/shell_dialogs/selected_file_info.h" namespace { @@ -53,15 +54,15 @@ SavePackageFilePickerChromeOS::SavePackageFilePickerChromeOS( this, new ChromeSelectFilePolicy(web_contents)); ui::SelectFileDialog::FileTypeInfo file_types; file_types.support_drive = true; - select_file_dialog_->SelectFile(ui::SelectFileDialog::SELECT_SAVEAS_FILE, - string16(), - suggested_path.ReplaceExtension("mhtml"), - &file_types, - 0, - "mhtml", - platform_util::GetTopLevel( - web_contents->GetNativeView()), - NULL); + select_file_dialog_->SelectFile( + ui::SelectFileDialog::SELECT_SAVEAS_FILE, + string16(), + suggested_path.ReplaceExtension("mhtml"), + &file_types, + 0, + "mhtml", + platform_util::GetTopLevel(web_contents->GetView()->GetNativeView()), + NULL); } else { FileSelected(suggested_path.ReplaceExtension("mhtml"), 0, NULL); } |