OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 #include "base/file_path.h" | |
12 #include "chrome/browser/ui/select_file_dialog.h" | |
13 #include "googleurl/src/gurl.h" | |
14 | |
15 class Profile; | |
16 | |
17 extern const char kFileBrowserDomain[]; | |
18 | |
19 // File manager helper methods. | |
20 namespace file_manager_util { | |
21 | |
22 // Gets base file browser url. | |
23 GURL GetFileBrowserExtensionUrl(); | |
24 GURL GetFileBrowserUrl(); | |
25 GURL GetMediaPlayerUrl(); | |
26 GURL GetMediaPlayerPlaylistUrl(); | |
27 | |
28 // Converts |full_file_path| into external filesystem: url. Returns false | |
29 // if |full_file_path| is not managed by the external filesystem provider. | |
30 bool ConvertFileToFileSystemUrl(Profile* profile, | |
31 const FilePath& full_file_path, const GURL& origin_url, GURL* url); | |
32 | |
33 // Converts |full_file_path| into |relative_path| within the external provider | |
34 // in File API. Returns false if |full_file_path| is not managed by the | |
35 // external filesystem provider. | |
36 bool ConvertFileToRelativeFileSystemPath(Profile* profile, | |
37 const FilePath& full_file_path, FilePath* relative_path); | |
38 | |
39 // Gets base file browser url for. | |
40 GURL GetFileBrowserUrlWithParams( | |
41 SelectFileDialog::Type type, | |
42 const string16& title, | |
43 const FilePath& default_virtual_path, | |
44 const SelectFileDialog::FileTypeInfo* file_types, | |
45 int file_type_index, | |
46 const FilePath::StringType& default_extension); | |
47 | |
48 // Opens file browser UI in its own tab on file system location defined with | |
49 // |dir|. | |
50 void ViewFolder(const FilePath& dir); | |
51 | |
52 void ViewItem(const FilePath& full_path, bool enqueue); | |
53 | |
54 } // namespace file_manager_util | |
55 | |
56 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ | |
OLD | NEW |