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

Unified Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h

Issue 2580713004: mediaview: Implement ArcDocumentsProviderBackendDelegate. (Closed)
Patch Set: ThreadChecker failure fix. Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
index 123b268ed337951687eeabdd95f707f058a860ea..67b74cfbeaf84ddbaaa33eb7843fae83bf4cc84e 100644
--- a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
+++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h
@@ -16,6 +16,8 @@
#include "components/arc/common/file_system.mojom.h"
#include "storage/browser/fileapi/async_file_util.h"
+class GURL;
+
namespace arc {
class ArcDocumentsProviderDocument;
@@ -29,6 +31,8 @@ class ArcDocumentsProviderRoot {
public:
using GetFileInfoCallback = storage::AsyncFileUtil::GetFileInfoCallback;
using ReadDirectoryCallback = storage::AsyncFileUtil::ReadDirectoryCallback;
+ using ResolveToContentUrlCallback =
+ base::Callback<void(const GURL& content_url)>;
ArcDocumentsProviderRoot(const std::string& authority,
const std::string& root_document_id);
@@ -43,6 +47,12 @@ class ArcDocumentsProviderRoot {
void ReadDirectory(const base::FilePath& path,
const ReadDirectoryCallback& callback);
+ // Resolves a file path into a content:// URL pointing to the file
+ // on DocumentsProvider. Returns URL that can be passed to
+ // ArcContentFileSystemFileSystemReader to read the content.
+ void ResolveToContentUrl(const base::FilePath& path,
+ const ResolveToContentUrlCallback& callback);
+
private:
void GetFileInfoAfterCacheUpdate(const base::FilePath& path,
const GetFileInfoCallback& callback);
@@ -56,6 +66,10 @@ class ArcDocumentsProviderRoot {
const ReadDirectoryCallback& callback,
base::Optional<std::vector<mojom::DocumentPtr>> children);
+ void ResolveToContentUrlAfterCacheUpdate(
+ const base::FilePath& path,
+ const ResolveToContentUrlCallback& callback);
+
void UpdateDirectoryCacheUpTo(const base::FilePath& path,
const base::Closure& callback);
void UpdateDirectoryCacheIter(const base::FilePath& parent_directory_path,

Powered by Google App Engine
This is Rietveld 408576698