OLD | NEW |
---|---|
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_MANAGER_UTIL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 SelectFileDialog::Type type, | 47 SelectFileDialog::Type type, |
48 const string16& title, | 48 const string16& title, |
49 const FilePath& default_virtual_path, | 49 const FilePath& default_virtual_path, |
50 const SelectFileDialog::FileTypeInfo* file_types, | 50 const SelectFileDialog::FileTypeInfo* file_types, |
51 int file_type_index, | 51 int file_type_index, |
52 const FilePath::StringType& default_extension); | 52 const FilePath::StringType& default_extension); |
53 | 53 |
54 // Get file dialog title string from its type. | 54 // Get file dialog title string from its type. |
55 string16 GetTitleFromType(SelectFileDialog::Type type); | 55 string16 GetTitleFromType(SelectFileDialog::Type type); |
56 | 56 |
57 // Opens file browser UI on its own tab on drive location defined with | 57 // Shows a freshly mounted removable drive. |
58 // |dir|. Automatically closes this tab on |dir| unmount. | 58 // If there is another File Browser instance open this call does nothing. The |
59 void ViewRemovableDrive(const FilePath& dir); | 59 // mount event will cause file_manager.js to show the new drive in the roots |
dgozman
2012/04/16 15:28:34
I'd say "in left panel" instead.
| |
60 // list, and that is all we want. | |
61 // If there is no File Browser open, this call opens a new one pointing to | |
62 // |path|. In this case the tab will automatically close on |path| unmount. | |
63 void ViewRemovableDrive(const FilePath& path); | |
60 | 64 |
61 // Opens file browser UI in its own tab on file system location defined with | 65 // Opens file browser UI in its own tab on file system location defined with |
62 // |dir|. | 66 // |dir|. |
63 void ViewFolder(const FilePath& dir); | 67 void ViewFolder(const FilePath& dir); |
64 | 68 |
65 // Opens file in the browser. | 69 // Opens file with the default File Browser handler. |
66 // TODO(kaznacheev): remove the obsolete enqueue parameter. | 70 void ViewFile(const FilePath& path); |
67 void ViewFile(const FilePath& full_path, bool enqueue); | 71 |
72 // Opens file browser on the folder containing the file, with the file selected. | |
73 void ShowFileInFolder(const FilePath& path); | |
68 | 74 |
69 // Tries to open |file| directly in the browser. Returns false if the browser | 75 // Tries to open |file| directly in the browser. Returns false if the browser |
70 // can't directly handle this type of file. | 76 // can't directly handle this type of file. |
71 bool TryViewingFile(const FilePath& file); | 77 bool TryViewingFile(Profile* profile, const FilePath& path); |
72 | 78 |
73 void InstallCRX(Profile* profile, const FilePath& full_path); | 79 void InstallCRX(Profile* profile, const FilePath& path); |
74 | 80 |
75 bool ShouldBeOpenedWithPdfPlugin(const char* file_extension); | 81 bool ShouldBeOpenedWithPdfPlugin(Profile* profile, const char* file_extension); |
76 | 82 |
77 // Converts the vector of progress status to their JSON (Value) form. | 83 // Converts the vector of progress status to their JSON (Value) form. |
78 base::ListValue* ProgressStatusVectorToListValue( | 84 base::ListValue* ProgressStatusVectorToListValue( |
79 Profile* profile, const GURL& origin_url, | 85 Profile* profile, const GURL& origin_url, |
80 const std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list); | 86 const std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list); |
81 | 87 |
82 } // namespace file_manager_util | 88 } // namespace file_manager_util |
83 | 89 |
84 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ | 90 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_UTIL_H_ |
OLD | NEW |