| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 SERVICES_USER_USER_SHELL_CLIENT_H_ | 5 #ifndef SERVICES_USER_USER_SHELL_CLIENT_H_ |
| 6 #define SERVICES_USER_USER_SHELL_CLIENT_H_ | 6 #define SERVICES_USER_USER_SHELL_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "components/filesystem/lock_table.h" | 10 #include "components/filesystem/lock_table.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public shell::InterfaceFactory<leveldb::mojom::LevelDBService> { | 27 public shell::InterfaceFactory<leveldb::mojom::LevelDBService> { |
| 28 public: | 28 public: |
| 29 UserShellClient( | 29 UserShellClient( |
| 30 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner, | 30 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner, |
| 31 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner); | 31 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner); |
| 32 ~UserShellClient() override; | 32 ~UserShellClient() override; |
| 33 | 33 |
| 34 private: | 34 private: |
| 35 // |Service| override: | 35 // |Service| override: |
| 36 void OnStart(const shell::Identity& identity) override; | 36 void OnStart(const shell::Identity& identity) override; |
| 37 bool OnConnect(shell::Connection* connection) override; | 37 bool OnConnect(const shell::Identity& remote_identity, |
| 38 shell::InterfaceRegistry* registry) override; |
| 38 | 39 |
| 39 // |InterfaceFactory<mojom::UserService>| implementation: | 40 // |InterfaceFactory<mojom::UserService>| implementation: |
| 40 void Create(const shell::Identity& remote_identity, | 41 void Create(const shell::Identity& remote_identity, |
| 41 mojom::UserServiceRequest request) override; | 42 mojom::UserServiceRequest request) override; |
| 42 | 43 |
| 43 // |InterfaceFactory<LevelDBService>| implementation: | 44 // |InterfaceFactory<LevelDBService>| implementation: |
| 44 void Create(const shell::Identity& remote_identity, | 45 void Create(const shell::Identity& remote_identity, |
| 45 leveldb::mojom::LevelDBServiceRequest request) override; | 46 leveldb::mojom::LevelDBServiceRequest request) override; |
| 46 | 47 |
| 47 void OnLevelDBServiceRequest(shell::Connection* connection, | |
| 48 leveldb::mojom::LevelDBServiceRequest request); | |
| 49 void OnLevelDBServiceError(); | 48 void OnLevelDBServiceError(); |
| 50 | 49 |
| 51 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner_; | 50 scoped_refptr<base::SingleThreadTaskRunner> user_service_runner_; |
| 52 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner_; | 51 scoped_refptr<base::SingleThreadTaskRunner> leveldb_service_runner_; |
| 53 | 52 |
| 54 // We create these two objects so we can delete them on the correct task | 53 // We create these two objects so we can delete them on the correct task |
| 55 // runners. | 54 // runners. |
| 56 class UserServiceObjects; | 55 class UserServiceObjects; |
| 57 std::unique_ptr<UserServiceObjects> user_objects_; | 56 std::unique_ptr<UserServiceObjects> user_objects_; |
| 58 | 57 |
| 59 class LevelDBServiceObjects; | 58 class LevelDBServiceObjects; |
| 60 std::unique_ptr<LevelDBServiceObjects> leveldb_objects_; | 59 std::unique_ptr<LevelDBServiceObjects> leveldb_objects_; |
| 61 | 60 |
| 62 DISALLOW_COPY_AND_ASSIGN(UserShellClient); | 61 DISALLOW_COPY_AND_ASSIGN(UserShellClient); |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 } // namespace user_service | 64 } // namespace user_service |
| 66 | 65 |
| 67 #endif // SERVICES_USER_USER_SHELL_CLIENT_H_ | 66 #endif // SERVICES_USER_USER_SHELL_CLIENT_H_ |
| OLD | NEW |