summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/file_manager/open_util.h
blob: c2c1faa0fd8fc9788b249ad57ac787cb9edc63d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file provides functions for opening an item (file or directory) using
// the file manager.

#ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_
#define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_

class Profile;

namespace base {
class FilePath;
}

namespace file_manager {
namespace util {

// Opens the file manager for the freshly mounted removable drive specified
// by |file_path|.
// If there is another file manager instance open, this call does nothing.
void OpenRemovableDrive(Profile* profile, const base::FilePath& file_path);

// Opens an item (file or directory). If the target is a directory, the
// directory will be opened in the file manager. If the target is a file, the
// file will be opened using a file handler, a file browser handler, or the
// browser (open in a tab). The default handler has precedence over other
// handlers, if defined for the type of the target file.
void OpenItem(Profile* profile, const base::FilePath& file_path);

// Opens the file manager for the folder containing the item specified by
// |file_path|, with the item selected.
void ShowItemInFolder(Profile* profile, const base::FilePath& file_path);

}  // namespace util
}  // namespace file_manager

#endif  // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_OPEN_UTIL_H_