| 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" |
| 11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 // Helper class for wiring file browser component extension with the rest of UI. | 15 // Helper class for wiring file browser component extension with the rest of UI. |
| 16 class FileManagerUtil { | 16 class FileManagerUtil { |
| 17 public: | 17 public: |
| 18 // Gets base file browser url. | 18 // Gets base file browser url. |
| 19 static GURL GetFileBrowserUrl(); | 19 static GURL GetFileBrowserUrl(); |
| 20 static GURL GetMediaPlayerUrl(); |
| 21 static GURL GetMediaPlayerPlaylistUrl(); |
| 22 |
| 20 // Converts |full_file_path| into external filesystem: url. Returns false | 23 // Converts |full_file_path| into external filesystem: url. Returns false |
| 21 // if |full_file_path| is not managed by the external filesystem provider. | 24 // if |full_file_path| is not managed by the external filesystem provider. |
| 22 static bool ConvertFileToFileSystemUrl(Profile* profile, | 25 static bool ConvertFileToFileSystemUrl(Profile* profile, |
| 23 const FilePath& full_file_path, const GURL& origin_url, GURL* url); | 26 const FilePath& full_file_path, const GURL& origin_url, GURL* url); |
| 24 // Gets base file browser url for. | 27 // Gets base file browser url for. |
| 25 static GURL GetFileBrowserUrlWithParams( | 28 static GURL GetFileBrowserUrlWithParams( |
| 26 SelectFileDialog::Type type, | 29 SelectFileDialog::Type type, |
| 27 const string16& title, | 30 const string16& title, |
| 28 const FilePath& default_path, | 31 const FilePath& default_path, |
| 29 const SelectFileDialog::FileTypeInfo* file_types, | 32 const SelectFileDialog::FileTypeInfo* file_types, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 47 const string16& title, | 50 const string16& title, |
| 48 const FilePath& default_path, | 51 const FilePath& default_path, |
| 49 const SelectFileDialog::FileTypeInfo* file_types, | 52 const SelectFileDialog::FileTypeInfo* file_types, |
| 50 int file_type_index, | 53 int file_type_index, |
| 51 const FilePath::StringType& default_extension); | 54 const FilePath::StringType& default_extension); |
| 52 | 55 |
| 53 DISALLOW_COPY_AND_ASSIGN(FileManagerUtil); | 56 DISALLOW_COPY_AND_ASSIGN(FileManagerUtil); |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 #endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 59 #endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
| OLD | NEW |