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

Unified Diff: chrome/browser/download/save_package_file_picker_chromeos.h

Issue 9809011: GData save package support with MHTML. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
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

Powered by Google App Engine
This is Rietveld 408576698