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

Side by Side Diff: chrome/browser/chromeos/arc/fileapi/arc_documents_provider_root.h

Issue 2572683004: mediaview: Introduce ArcDocumentsProviderRoot. (Closed)
Patch Set: Constructors are called on the UI thread. 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ROOT_H_
6 #define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ROOT_H_
7
8 #include <string>
9
10 #include "base/files/file_path.h"
11 #include "base/macros.h"
12 #include "storage/browser/fileapi/async_file_util.h"
13
14 namespace arc {
15
16 // Represents a file system root in Android Documents Provider.
17 //
18 // All methods must be called on the IO thread.
19 class ArcDocumentsProviderRoot {
20 public:
21 using GetFileInfoCallback = storage::AsyncFileUtil::GetFileInfoCallback;
22 using ReadDirectoryCallback = storage::AsyncFileUtil::ReadDirectoryCallback;
23
24 ArcDocumentsProviderRoot(const std::string& authority,
25 const std::string& root_document_id);
26 ~ArcDocumentsProviderRoot();
27
28 // Queries information of a file just like AsyncFileUtil.GetFileInfo().
29 void GetFileInfo(const base::FilePath& path,
30 const GetFileInfoCallback& callback);
31
32 // Queries a list of files under a directory just like
33 // AsyncFileUtil.ReadDirectory().
34 void ReadDirectory(const base::FilePath& path,
35 const ReadDirectoryCallback& callback);
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderRoot);
39 };
40
41 } // namespace arc
42
43 #endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ROOT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698