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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_CHROMEOS_H_
6 #define CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_CHROMEOS_H_
7 #pragma once
8
9 #include "base/platform_file.h"
10 #include "chrome/browser/download/save_package_file_picker.h"
11 #include "content/public/browser/web_contents_observer.h"
12
13 namespace gdata {
14 class GDataFileSystem;
15 }
16
17 // Handles showing a dialog to the user to ask for the filename to save a page
18 // on ChromeOS.
19 class SavePackageFilePickerChromeOS : public SavePackageFilePicker,
20 public content::WebContentsObserver {
21 public:
22 SavePackageFilePickerChromeOS(content::WebContents* web_contents,
23 const FilePath& suggested_path,
24 const FilePath::StringType& default_extension,
25 bool can_save_as_complete,
26 DownloadPrefs* download_prefs,
27 content::SaveFilePathPickedCallback callback);
28
29 private:
30 virtual ~SavePackageFilePickerChromeOS();
31
32 // SelectFileDialog::Listener implementation.
33 virtual void FileSelected(const FilePath& path,
34 int index,
35 void* params) OVERRIDE;
36
37 // Calls WebContent::GenerateMHTML.
38 void GenerateMHTML(FilePath* gdata_tmp_download_path);
39
40 // Callback for WebContents::GenerateMHTML.
41 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.
42
43 // GDataFileSystem::TransferFile callback.
44 void OnTransferFile(base::PlatformFileError error);
45
46 // Use web_contents() to get at GDataFileSystem.
47 gdata::GDataFileSystem* GetGDataFileSystem();
48
49 FilePath selected_path_;
50
51 DISALLOW_COPY_AND_ASSIGN(SavePackageFilePickerChromeOS);
52 };
53
54 #endif // CHROME_BROWSER_DOWNLOAD_SAVE_PACKAGE_FILE_PICKER_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698