OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ | 5 #ifndef COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ |
6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ | 6 #define COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/filesystem/directory_impl.h" | 9 #include "components/filesystem/directory_impl.h" |
10 #include "components/filesystem/file_system_impl.h" | 10 #include "components/filesystem/file_system_impl.h" |
11 #include "components/filesystem/public/interfaces/file_system.mojom.h" | 11 #include "components/filesystem/public/interfaces/file_system.mojom.h" |
12 #include "mojo/application/public/cpp/application_delegate.h" | 12 #include "mojo/application/public/cpp/application_delegate.h" |
13 #include "mojo/application/public/cpp/interface_factory.h" | 13 #include "mojo/application/public/cpp/interface_factory.h" |
| 14 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
14 | 15 |
15 namespace mojo { | 16 namespace mojo { |
16 class ApplicationImpl; | 17 class ApplicationImpl; |
17 } | 18 } |
18 | 19 |
19 namespace filesystem { | 20 namespace filesystem { |
20 | 21 |
21 class FileSystemApp : public mojo::ApplicationDelegate, | 22 class FileSystemApp : public mojo::ApplicationDelegate, |
22 public mojo::InterfaceFactory<FileSystem> { | 23 public mojo::InterfaceFactory<FileSystem> { |
23 public: | 24 public: |
(...skipping 28 matching lines...) Expand all Loading... |
52 ~Client(); | 53 ~Client(); |
53 | 54 |
54 Client& operator=(Client&& rhs); | 55 Client& operator=(Client&& rhs); |
55 | 56 |
56 DirectoryImpl* directory_; | 57 DirectoryImpl* directory_; |
57 FileSystemClientPtr fs_client_; | 58 FileSystemClientPtr fs_client_; |
58 }; | 59 }; |
59 std::vector<Client> client_mapping_; | 60 std::vector<Client> client_mapping_; |
60 | 61 |
61 mojo::ApplicationImpl* app_; | 62 mojo::ApplicationImpl* app_; |
| 63 mojo::TracingImpl tracing_; |
62 | 64 |
63 // Set to true when our shell connection is closed. On connection error, we | 65 // Set to true when our shell connection is closed. On connection error, we |
64 // then broadcast a notification to all FileSystemClients that they should | 66 // then broadcast a notification to all FileSystemClients that they should |
65 // shut down. Once the final one does, then we QuitNow(). | 67 // shut down. Once the final one does, then we QuitNow(). |
66 bool in_shutdown_; | 68 bool in_shutdown_; |
67 | 69 |
68 DISALLOW_COPY_AND_ASSIGN(FileSystemApp); | 70 DISALLOW_COPY_AND_ASSIGN(FileSystemApp); |
69 }; | 71 }; |
70 | 72 |
71 } // namespace filesystem | 73 } // namespace filesystem |
72 | 74 |
73 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ | 75 #endif // COMPONENTS_FILESYSTEM_FILE_SYSTEM_APP_H_ |
OLD | NEW |