OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "chrome/browser/ui/shell_dialogs.h" | 10 #include "chrome/browser/ui/shell_dialogs.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // Gets base file browser url for. | 35 // Gets base file browser url for. |
36 static GURL GetFileBrowserUrlWithParams( | 36 static GURL GetFileBrowserUrlWithParams( |
37 SelectFileDialog::Type type, | 37 SelectFileDialog::Type type, |
38 const string16& title, | 38 const string16& title, |
39 const FilePath& default_virtual_path, | 39 const FilePath& default_virtual_path, |
40 const SelectFileDialog::FileTypeInfo* file_types, | 40 const SelectFileDialog::FileTypeInfo* file_types, |
41 int file_type_index, | 41 int file_type_index, |
42 const FilePath::StringType& default_extension); | 42 const FilePath::StringType& default_extension); |
43 | 43 |
44 // Opens file browser UI in its own tab on file system location defined with | 44 // Opens file browser UI in its own tab on file system location defined with |
45 // |default_path|. | 45 // |dir|. |
46 static void ShowFullTabUrl(Profile* profile, | 46 static void ShowFullTabUrl(Profile* profile, |
47 const FilePath& default_path); | 47 const FilePath& dir); |
48 | 48 |
49 static void ViewItem(const FilePath& full_path, bool enqueue); | 49 static void ViewItem(const FilePath& full_path, bool enqueue); |
50 | 50 |
51 private: | 51 private: |
52 FileManagerUtil() {} | 52 FileManagerUtil() {} |
53 // Helper to convert numeric dialog type to a string. | 53 // Helper to convert numeric dialog type to a string. |
54 static std::string GetDialogTypeAsString(SelectFileDialog::Type dialog_type); | 54 static std::string GetDialogTypeAsString(SelectFileDialog::Type dialog_type); |
55 // Help to convert potential dialog arguments into json. | |
56 static std::string GetArgumentsJson( | |
57 SelectFileDialog::Type type, | |
58 const string16& title, | |
59 const FilePath& default_path, | |
60 const SelectFileDialog::FileTypeInfo* file_types, | |
61 int file_type_index, | |
62 const FilePath::StringType& default_extension); | |
63 | 55 |
64 DISALLOW_COPY_AND_ASSIGN(FileManagerUtil); | 56 DISALLOW_COPY_AND_ASSIGN(FileManagerUtil); |
65 }; | 57 }; |
66 | 58 |
67 #endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 59 #endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
OLD | NEW |