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.
5 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_
6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_
8 #include "base/macros.h"
9 #include "components/filesystem/public/interfaces/file_system.mojom.h"
10 #include "mojo/public/cpp/bindings/interface_request.h"
11 #include "mojo/public/cpp/bindings/strong_binding.h"
14 class ApplicationConnection
;
17 namespace filesystem
{
19 class FileSystemImpl
: public FileSystem
{
21 FileSystemImpl(mojo::ApplicationConnection
* connection
,
22 mojo::InterfaceRequest
<FileSystem
> request
);
23 ~FileSystemImpl() override
;
25 // |Files| implementation:
26 // We provide a "private" temporary file system as the default. In Debug
27 // builds, we also provide access to a common file system named "debug"
28 // (stored under ~/MojoDebug).
29 void OpenFileSystem(const mojo::String
& file_system
,
30 mojo::InterfaceRequest
<Directory
> directory
,
31 const OpenFileSystemCallback
& callback
) override
;
34 const std::string remote_application_url_
;
35 mojo::StrongBinding
<FileSystem
> binding_
;
37 DISALLOW_COPY_AND_ASSIGN(FileSystemImpl
);
40 } // namespace filesystem
42 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_IMPL_H_