| 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 <string> |
| 10 |
| 9 #include "base/file_path.h" | 11 #include "base/file_path.h" |
| 10 #include "chrome/browser/ui/shell_dialogs.h" | 12 #include "chrome/browser/ui/shell_dialogs.h" |
| 11 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 12 | 14 |
| 13 class Profile; | 15 class Profile; |
| 14 | 16 |
| 15 extern const char kFileBrowserDomain[]; | 17 extern const char kFileBrowserDomain[]; |
| 16 | 18 |
| 17 // Helper class for wiring file browser component extension with the rest of UI. | 19 // Helper class for wiring file browser component extension with the rest of UI. |
| 18 class FileManagerUtil { | 20 class FileManagerUtil { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 38 static GURL GetFileBrowserUrlWithParams( | 40 static GURL GetFileBrowserUrlWithParams( |
| 39 SelectFileDialog::Type type, | 41 SelectFileDialog::Type type, |
| 40 const string16& title, | 42 const string16& title, |
| 41 const FilePath& default_virtual_path, | 43 const FilePath& default_virtual_path, |
| 42 const SelectFileDialog::FileTypeInfo* file_types, | 44 const SelectFileDialog::FileTypeInfo* file_types, |
| 43 int file_type_index, | 45 int file_type_index, |
| 44 const FilePath::StringType& default_extension); | 46 const FilePath::StringType& default_extension); |
| 45 | 47 |
| 46 // Opens file browser UI in its own tab on file system location defined with | 48 // Opens file browser UI in its own tab on file system location defined with |
| 47 // |dir|. | 49 // |dir|. |
| 48 static void ShowFullTabUrl(Profile* profile, | 50 static void ViewFolder(const FilePath& dir); |
| 49 const FilePath& dir); | |
| 50 | 51 |
| 51 static void ViewItem(const FilePath& full_path, bool enqueue); | 52 static void ViewItem(const FilePath& full_path, bool enqueue); |
| 52 | 53 |
| 53 private: | 54 private: |
| 54 FileManagerUtil() {} | 55 FileManagerUtil() {} |
| 55 // Helper to convert numeric dialog type to a string. | 56 // Helper to convert numeric dialog type to a string. |
| 56 static std::string GetDialogTypeAsString(SelectFileDialog::Type dialog_type); | 57 static std::string GetDialogTypeAsString(SelectFileDialog::Type dialog_type); |
| 57 | 58 |
| 58 DISALLOW_COPY_AND_ASSIGN(FileManagerUtil); | 59 DISALLOW_COPY_AND_ASSIGN(FileManagerUtil); |
| 59 }; | 60 }; |
| 60 | 61 |
| 61 #endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 62 #endif // CHROME_BROWSER_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
| OLD | NEW |