OLD | NEW |
---|---|
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 utility functions for fileBrowserPrivate API. | 5 // This file provides utility functions for fileBrowserPrivate API. |
6 | 6 |
7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ | 7 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ |
8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ | 8 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
11 #include "chrome/browser/chromeos/extensions/file_manager/volume_manager.h" | |
11 #include "chrome/browser/google_apis/gdata_wapi_parser.h" | 12 #include "chrome/browser/google_apis/gdata_wapi_parser.h" |
12 #include "url/gurl.h" | 13 #include "url/gurl.h" |
13 | 14 |
14 class ExtensionFunctionDispatcher; | 15 class ExtensionFunctionDispatcher; |
15 class Profile; | 16 class Profile; |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 class RenderViewHost; | 19 class RenderViewHost; |
19 } | 20 } |
20 | 21 |
21 namespace ui { | 22 namespace ui { |
22 struct SelectedFileInfo; | 23 struct SelectedFileInfo; |
23 } | 24 } |
24 | 25 |
25 namespace file_manager { | 26 namespace file_manager { |
26 namespace util { | 27 namespace util { |
27 | 28 |
29 // Returns string representaion of VolumeType. | |
30 std::string VolumeTypeToString(VolumeType type); | |
satorux1
2013/09/04 05:01:55
Move this to volume_manager.h where VolumeType is
hidehiko
2013/09/04 05:13:25
This is rather mapping from VolumeType to "string
satorux1
2013/09/05 01:46:24
Oh I see. Then let's clarify by the function comme
hidehiko
2013/09/05 03:12:41
VolumeTypeToStringEnum sounds better. Done.
| |
31 | |
28 // Returns the ID of the tab associated with the dispatcher. Returns 0 on | 32 // Returns the ID of the tab associated with the dispatcher. Returns 0 on |
29 // error. | 33 // error. |
30 int32 GetTabId(ExtensionFunctionDispatcher* dispatcher); | 34 int32 GetTabId(ExtensionFunctionDispatcher* dispatcher); |
31 | 35 |
32 // Returns the local FilePath associated with |url|. If the file isn't of the | 36 // Returns the local FilePath associated with |url|. If the file isn't of the |
33 // type FileSystemBackend handles, returns an empty | 37 // type FileSystemBackend handles, returns an empty |
34 // FilePath. |render_view_host| and |profile| are needed to obtain the | 38 // FilePath. |render_view_host| and |profile| are needed to obtain the |
35 // FileSystemContext currently in use. | 39 // FileSystemContext currently in use. |
36 // | 40 // |
37 // Local paths will look like "/home/chronos/user/Downloads/foo/bar.txt" or | 41 // Local paths will look like "/home/chronos/user/Downloads/foo/bar.txt" or |
(...skipping 26 matching lines...) Expand all Loading... | |
64 void GetSelectedFileInfo(content::RenderViewHost* render_view_host, | 68 void GetSelectedFileInfo(content::RenderViewHost* render_view_host, |
65 Profile* profile, | 69 Profile* profile, |
66 const std::vector<GURL>& file_urls, | 70 const std::vector<GURL>& file_urls, |
67 GetSelectedFileInfoLocalPathOption local_path_option, | 71 GetSelectedFileInfoLocalPathOption local_path_option, |
68 GetSelectedFileInfoCallback callback); | 72 GetSelectedFileInfoCallback callback); |
69 | 73 |
70 } // namespace util | 74 } // namespace util |
71 } // namespace file_manager | 75 } // namespace file_manager |
72 | 76 |
73 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ | 77 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_UTIL_H_ |
OLD | NEW |