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

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: Add comments and TODOs 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 "base/memory/ref_counted.h"
11 #include "chrome/browser/ui/select_file_dialog.h"
12 #include "content/public/browser/web_contents_observer.h"
13
14 namespace gdata {
15 class GDataFileSystem;
16 }
17
18 // Handles showing a dialog to the user to ask for the filename to save a page
19 // on ChromeOS.
20 class SavePackageFilePickerChromeOS : public SelectFileDialog::Listener,
21 public content::WebContentsObserver {
22 public:
23 SavePackageFilePickerChromeOS(content::WebContents* web_contents,
24 const FilePath& suggested_path);
25
26 private:
27 virtual ~SavePackageFilePickerChromeOS();
28
29 // SelectFileDialog::Listener implementation.
30 virtual void FileSelected(const FilePath& path,
31 int index,
32 void* params) OVERRIDE;
33 virtual void FileSelectionCanceled(void* params) OVERRIDE;
34
35 // Calls WebContent::GenerateMHTML.
36 void GenerateMHTML(const FilePath* mhtml_path);
37
38 // Callback for WebContents::GenerateMHTML.
39 void OnMHTMLGenerated(const FilePath& file_path, int64 file_size);
40
41 // GDataFileSystem::TransferFile callback.
42 void OnTransferFile(base::PlatformFileError error);
43
44 // Use web_contents() to get at GDataFileSystem.
45 gdata::GDataFileSystem* GetGDataFileSystem();
46
47 // For managing select file dialogs.
48 scoped_refptr<SelectFileDialog> select_file_dialog_;
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