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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_private_api.h

Issue 11309014: File manager: support for zipping selected files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compiler warning: declare base::FileDescriptor a struct, not a class. The struct is put after t… Created 8 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/platform_file.h" 15 #include "base/platform_file.h"
16 #include "chrome/browser/chromeos/drive/drive_cache.h" 16 #include "chrome/browser/chromeos/drive/drive_cache.h"
17 #include "chrome/browser/chromeos/drive/drive_file_error.h" 17 #include "chrome/browser/chromeos/drive/drive_file_error.h"
18 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h" 18 #include "chrome/browser/chromeos/extensions/file_browser_event_router.h"
19 #include "chrome/browser/chromeos/extensions/zip_file_creator.h"
19 #include "chrome/browser/extensions/extension_function.h" 20 #include "chrome/browser/extensions/extension_function.h"
20 #include "chrome/browser/prefs/pref_service.h" 21 #include "chrome/browser/prefs/pref_service.h"
21 #include "googleurl/src/url_util.h" 22 #include "googleurl/src/url_util.h"
22 23
23 class GURL; 24 class GURL;
24 25
25 namespace fileapi { 26 namespace fileapi {
26 class FileSystemContext; 27 class FileSystemContext;
27 } 28 }
28 29
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 public: 777 public:
777 DECLARE_EXTENSION_FUNCTION_NAME( 778 DECLARE_EXTENSION_FUNCTION_NAME(
778 "fileBrowserPrivate.requestDirectoryRefresh"); 779 "fileBrowserPrivate.requestDirectoryRefresh");
779 780
780 protected: 781 protected:
781 virtual ~RequestDirectoryRefreshFunction() {} 782 virtual ~RequestDirectoryRefreshFunction() {}
782 783
783 virtual bool RunImpl() OVERRIDE; 784 virtual bool RunImpl() OVERRIDE;
784 }; 785 };
785 786
787 // Create a zip file for the selected files.
788 class ZipSelectionFunction : public FileBrowserFunction,
789 public extensions::ZipFileCreator::Observer {
790 public:
791 DECLARE_EXTENSION_FUNCTION_NAME("fileBrowserPrivate.zipSelection");
792
793 ZipSelectionFunction();
794
795 protected:
796 virtual ~ZipSelectionFunction();
797
798 // AsyncExtensionFunction overrides.
799 virtual bool RunImpl() OVERRIDE;
800
801 // extensions::ZipFileCreator::Delegate overrides.
802 virtual void OnZipDone(bool success) OVERRIDE;
803
804 private:
805 // A callback method to handle the result of
806 // GetLocalPathsOnFileThreadAndRunCallbackOnUIThread.
807 void GetLocalPathsResponseOnUIThread(const std::string dest_name,
808 const SelectedFileInfoList& files);
809
810 scoped_refptr<extensions::ZipFileCreator> zip_file_creator_;
811 };
812
786 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_ 813 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_PRIVATE_API_H_
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/extensions/file_browser_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698