OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2013 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 // This file provides utilities for openinig files with the browser. | |
kinaba
2013/08/23 06:51:55
nit: opening
satorux1
2013/08/23 08:22:29
Done.
| |
6 | |
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_OPEN_WITH_BROWSER_H_ | |
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_OPEN_WITH_BROWSER_H_ | |
9 | |
10 #include <string> | |
kinaba
2013/08/23 06:51:55
not needed?
satorux1
2013/08/23 08:22:29
Done.
| |
11 | |
12 #include "base/files/file_path.h" | |
13 | |
14 class Browser; | |
15 class Profile; | |
16 | |
17 namespace file_manager { | |
18 namespace util { | |
19 | |
20 // Opens the file specified by |file_path| with the browser. This function takes | |
21 // care of the following intricacies: | |
22 // | |
23 // - If the file is a Drive hosted document, the hosted document will be | |
24 // opened in the browser by extracting the right URL for the file. | |
25 // - If the file is a CRX file, the CRX file will be installed. | |
26 // - If the file is on Drive, the file will be downloaded from Drive as | |
27 // needed. | |
28 // | |
29 // Returns false if failed to open. This happens if the file type is unknown. | |
30 bool OpenFileWithBrowser(Browser* browser, const base::FilePath& file_path); | |
31 | |
32 // Checks whether a pepper plugin for |file_extension| is enabled. | |
33 bool ShouldBeOpenedWithPlugin( | |
34 Profile* profile, | |
35 const base::FilePath::StringType& file_extension); | |
36 | |
37 } // namespace util | |
38 } // namespace file_manager | |
39 | |
40 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_OPEN_WITH_BROWSER_H_ | |
OLD | NEW |