[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 1 | // Copyright 2014 The Chromium Authors. All rights reserved. |
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 5 | #ifndef EXTENSIONS_RENDERER_FILE_SYSTEM_NATIVES_H_ |
6 | #define EXTENSIONS_RENDERER_FILE_SYSTEM_NATIVES_H_ | ||||
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 7 | |
8 | #include "base/compiler_specific.h" | ||||
avi | 2d124c0 | 2015-12-23 06:36:42 | [diff] [blame] | 9 | #include "base/macros.h" |
[email protected] | f55c90ee6 | 2014-04-12 00:50:03 | [diff] [blame] | 10 | #include "extensions/renderer/object_backed_native_handler.h" |
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 11 | |
12 | namespace extensions { | ||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 13 | class ScriptContext; |
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 14 | |
15 | // Custom bindings for the nativeFileSystem API. | ||||
[email protected] | 4f1633f | 2013-03-09 14:26:24 | [diff] [blame] | 16 | class FileSystemNatives : public ObjectBackedNativeHandler { |
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 17 | public: |
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 18 | explicit FileSystemNatives(ScriptContext* context); |
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 19 | |
Devlin Cronin | d9ea834 | 2018-01-27 06:00:04 | [diff] [blame] | 20 | // ObjectBackedNativeHandler: |
21 | void AddRoutes() override; | ||||
22 | |||||
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 23 | private: |
[email protected] | d8c5fbb | 2013-06-14 11:35:25 | [diff] [blame] | 24 | void GetFileEntry(const v8::FunctionCallbackInfo<v8::Value>& args); |
25 | void GetIsolatedFileSystem(const v8::FunctionCallbackInfo<v8::Value>& args); | ||||
26 | void CrackIsolatedFileSystemName( | ||||
27 | const v8::FunctionCallbackInfo<v8::Value>& args); | ||||
[email protected] | 4f1633f | 2013-03-09 14:26:24 | [diff] [blame] | 28 | |
[email protected] | 7bc8299d | 2012-06-13 09:18:29 | [diff] [blame] | 29 | DISALLOW_COPY_AND_ASSIGN(FileSystemNatives); |
30 | }; | ||||
31 | |||||
32 | } // namespace extensions | ||||
33 | |||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 34 | #endif // EXTENSIONS_RENDERER_FILE_SYSTEM_NATIVES_H_ |