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

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

Issue 352393002: Be explicit about target type in platform_util::OpenItem() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Chdir on Linux, Fix memory leak in test and address Mac comment. Created 5 years, 10 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 | Annotate | Revision Log
OLDNEW
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 // This file provides functions for opening an item (file or directory) using 5 // This file provides functions for opening an item (file or directory) using
6 // the file manager. 6 // the file manager.
7 7
8 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_ 8 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_
9 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_ 9 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_
10 10
11 #include "base/callback_forward.h"
12 #include "chrome/browser/platform_util.h"
13
11 class Profile; 14 class Profile;
12 15
13 namespace base { 16 namespace base {
14 class FilePath; 17 class FilePath;
15 } 18 }
16 19
17 namespace file_manager { 20 namespace file_manager {
18 namespace util { 21 namespace util {
19 22
20 // Opens an item (file or directory). If the target is a directory, the 23 // Opens a file using a file handler, a file browser handler, or the browser
21 // directory will be opened in the file manager. If the target is a file, the 24 // (open in a tab). The default handler has precedence over other handlers, if
22 // file will be opened using a file handler, a file browser handler, or the 25 // defined for the type of the target file.
23 // browser (open in a tab). The default handler has precedence over other 26 void OpenFile(Profile* profile,
24 // handlers, if defined for the type of the target file. 27 const base::FilePath& file_path,
25 void OpenItem(Profile* profile, const base::FilePath& file_path); 28 const platform_util::OpenOperationCallback& callback);
29
30 // Opens a folder in the file manager.
31 void OpenFolder(Profile* profile,
32 const base::FilePath& file_path,
33 const platform_util::OpenOperationCallback& callback);
26 34
27 // Opens the file manager for the folder containing the item specified by 35 // Opens the file manager for the folder containing the item specified by
28 // |file_path|, with the item selected. 36 // |file_path|, with the item selected.
29 void ShowItemInFolder(Profile* profile, const base::FilePath& file_path); 37 void ShowItemInFolder(Profile* profile,
38 const base::FilePath& file_path,
39 const platform_util::OpenOperationCallback& callback);
40
41 // Change the behavior of the above functions to do everything except launch any
42 // extensions including a file browser.
43 void DisableShellOperationsForTesting();
30 44
31 } // namespace util 45 } // namespace util
32 } // namespace file_manager 46 } // namespace file_manager
33 47
34 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_ 48 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698