Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / file_manager / file_browser_handlers.h
blobef9524c461e190085f2df05bbdf9e3aad923d4d4
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 utility functions for file browser handlers.
6 // https://developer.chrome.com/extensions/fileBrowserHandler.html
8 #ifndef CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_
9 #define CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_
11 #include <string>
12 #include <vector>
14 #include "base/basictypes.h"
15 #include "base/callback_forward.h"
16 #include "chrome/browser/chromeos/file_manager/file_tasks.h"
18 class FileBrowserHandler;
19 class GURL;
20 class Profile;
22 namespace base {
23 class FilePath;
26 namespace extensions {
27 class Extension;
30 namespace fileapi {
31 class FileSystemURL;
34 namespace file_manager {
35 namespace file_browser_handlers {
37 // Tasks are stored as a vector in order of priorities.
38 typedef std::vector<const FileBrowserHandler*> FileBrowserHandlerList;
40 // Returns true if the given task is a fallback file browser handler. Such
41 // handlers are Files.app's internal handlers as well as quick office
42 // extensions.
43 bool IsFallbackFileBrowserHandler(const file_tasks::TaskDescriptor& task);
45 // Returns the list of file browser handlers that can open all files in
46 // |file_list|.
47 FileBrowserHandlerList FindFileBrowserHandlers(
48 Profile* profile,
49 const std::vector<GURL>& file_list);
51 // Executes a file browser handler specified by |extension| of the given
52 // action ID for |file_urls|. Returns false if undeclared handlers are
53 // found. |done| is on completion. See also the comment at ExecuteFileTask()
54 // for other parameters.
55 bool ExecuteFileBrowserHandler(
56 Profile* profile,
57 const extensions::Extension* extension,
58 const std::string& action_id,
59 const std::vector<fileapi::FileSystemURL>& file_urls,
60 const file_tasks::FileTaskFinishedCallback& done);
62 } // namespace file_browser_handlers
63 } // namespace file_manager
65 #endif // CHROME_BROWSER_CHROMEOS_FILE_MANAGER_FILE_BROWSER_HANDLERS_H_