Chromium Code Reviews| Index: chrome/browser/download/save_package_file_picker_chromeos.h |
| =================================================================== |
| --- chrome/browser/download/save_package_file_picker_chromeos.h (revision 0) |
| +++ chrome/browser/download/save_package_file_picker_chromeos.h (revision 0) |
| @@ -0,0 +1,54 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_CHROMEOS_H_ |
| +#define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_CHROMEOS_H_ |
| +#pragma once |
| + |
| +#include "base/platform_file.h" |
| +#include "chrome/browser/download/save_package_file_picker.h" |
| +#include "content/public/browser/web_contents_observer.h" |
| + |
| +namespace gdata { |
| +class GDataFileSystem; |
| +} |
| + |
| +// Handles showing a dialog to the user to ask for the filename to save a page |
| +// on ChromeOS. |
| +class SavePackageFilePickerChromeOS : public SavePackageFilePicker, |
| + public content::WebContentsObserver { |
| + public: |
| + SavePackageFilePickerChromeOS(content::WebContents* web_contents, |
| + const FilePath& suggested_path, |
| + const FilePath::StringType& default_extension, |
| + bool can_save_as_complete, |
| + DownloadPrefs* download_prefs, |
| + content::SaveFilePathPickedCallback callback); |
| + |
| + private: |
| + virtual ~SavePackageFilePickerChromeOS(); |
| + |
| + // SelectFileDialog::Listener implementation. |
| + virtual void FileSelected(const FilePath& path, |
| + int index, |
| + void* params) OVERRIDE; |
| + |
| + // Calls WebContent::GenerateMHTML. |
| + void GenerateMHTML(FilePath* gdata_tmp_download_path); |
| + |
| + // Callback for WebContents::GenerateMHTML. |
| + void MHTMLGenerated(const FilePath& file_path, int64 file_size); |
|
zel
2012/03/26 16:13:14
nit: OnMHTMLGenerated
achuithb
2012/03/26 19:51:39
Done.
|
| + |
| + // GDataFileSystem::TransferFile callback. |
| + void OnTransferFile(base::PlatformFileError error); |
| + |
| + // Use web_contents() to get at GDataFileSystem. |
| + gdata::GDataFileSystem* GetGDataFileSystem(); |
| + |
| + FilePath selected_path_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SavePackageFilePickerChromeOS); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_CHROMEOS_H_ |
| Property changes on: chrome/browser/download/save_package_file_picker_chromeos.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |