OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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_COMMON_EXTENSIONS_API_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_H ANDLER_H_ | |
6 #define CHROME_COMMON_EXTENSIONS_API_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDER_H ANDLER_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 #include "chrome/common/extensions/api/file_system_provider.h" | |
12 #include "extensions/common/extension.h" | |
13 #include "extensions/common/manifest_handler.h" | |
14 | |
15 namespace extensions { | |
16 | |
17 // Source of provider file systems. | |
18 enum FileSystemProviderSource { SOURCE_FILE, SOURCE_NETWORK, SOURCE_DEVICE }; | |
19 | |
20 // Represents capabilities of a file system provider. | |
21 class FileSystemProviderCapabilities : public Extension::ManifestData { | |
not at google - send to devlin
2015/04/23 23:16:35
Consider declaring this here:
https://code.google
mtomasz
2015/04/24 12:16:11
I often feel reluctant to use generated types wide
not at google - send to devlin
2015/04/24 16:18:32
I agree. My other issue with using generated types
mtomasz
2015/04/24 17:12:10
I may be missing sth here, but it's exactly what I
| |
22 public: | |
23 FileSystemProviderCapabilities(); | |
24 FileSystemProviderCapabilities(bool configurable, | |
25 bool multiple_mounts, | |
26 FileSystemProviderSource source); | |
27 ~FileSystemProviderCapabilities() override; | |
28 | |
29 // Returns an array of URL handlers |extension| has defined in its manifest. | |
30 static FileSystemProviderCapabilities Get(const Extension* extension); | |
31 | |
32 bool configurable() const { return configurable_; } | |
33 bool multiple_mounts() const { return multiple_mounts_; } | |
34 FileSystemProviderSource source() const { return source_; } | |
35 | |
36 private: | |
37 bool configurable_; | |
38 bool multiple_mounts_; | |
39 FileSystemProviderSource source_; | |
40 }; | |
41 | |
42 // Parses the "file_system_provider" manifest key. | |
43 class FileSystemProviderHandler : public ManifestHandler { | |
44 public: | |
45 FileSystemProviderHandler(); | |
46 ~FileSystemProviderHandler() override; | |
47 | |
48 // ManifestHandler overrides. | |
49 bool Parse(Extension* extension, base::string16* error) override; | |
50 | |
51 private: | |
52 const std::vector<std::string> Keys() const override; | |
53 | |
54 DISALLOW_COPY_AND_ASSIGN(FileSystemProviderHandler); | |
55 }; | |
56 | |
57 } // namespace extensions | |
58 | |
59 #endif // CHROME_COMMON_EXTENSIONS_API_FILE_SYSTEM_PROVIDER_FILE_SYSTEM_PROVIDE R_HANDLER_H_ | |
OLD | NEW |