Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Side by Side Diff: chrome/browser/chromeos/file_manager/open_with_browser.h

Issue 589473002: Files.app: Enable externalfile: protocol for MTP volumes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 // This file provides utilities for opening files with the browser. 5 // This file provides utilities for opening files with the browser.
6 6
7 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_WITH_BROWSER_H_ 7 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_WITH_BROWSER_H_
8 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_WITH_BROWSER_H_ 8 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_WITH_BROWSER_H_
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
11 11
12 class Profile; 12 class Profile;
13 13
14 namespace storage {
15 class FileSystemURL;
16 }
17
14 namespace file_manager { 18 namespace file_manager {
15 namespace util { 19 namespace util {
16 20
17 // Opens the file specified by |file_path| with the browser for 21 // Opens the file specified by |file_path| with the browser for
18 // |profile|. This function takes care of the following intricacies: 22 // |profile|. This function takes care of the following intricacies:
19 // 23 //
20 // - If there is no active browser window, open it. 24 // - If there is no active browser window, open it.
21 // - If the file is a Drive hosted document, the hosted document will be 25 // - If the file is a Drive hosted document, the hosted document will be
22 // opened in the browser by extracting the right URL for the file. 26 // opened in the browser by extracting the right URL for the file.
23 // - If the file is on Drive, the file will be downloaded from Drive as 27 // - If the file is on Drive, the file will be downloaded from Drive as
24 // needed. 28 // needed.
25 // 29 //
26 // Returns false if failed to open. This happens if the file type is unknown. 30 // Returns false if failed to open. This happens if the file type is unknown.
27 bool OpenFileWithBrowser(Profile* profile, const base::FilePath& file_path); 31 bool OpenFileWithBrowser(Profile* profile,
32 const storage::FileSystemURL& file_system_url);
28 33
29 // Checks whether a pepper plugin for |file_extension| is enabled. 34 // Checks whether a pepper plugin for |file_extension| is enabled.
30 bool ShouldBeOpenedWithPlugin( 35 bool ShouldBeOpenedWithPlugin(
31 Profile* profile, 36 Profile* profile,
32 const base::FilePath::StringType& file_extension); 37 const base::FilePath::StringType& file_extension);
33 38
34 } // namespace util 39 } // namespace util
35 } // namespace file_manager 40 } // namespace file_manager
36 41
37 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_WITH_BROWSER_H_ 42 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_WITH_BROWSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698