| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_ | 5 #ifndef MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_ |
| 6 #define MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_ | 6 #define MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/scoped_native_library.h" |
| 11 #include "base/threading/simple_thread.h" | 12 #include "base/threading/simple_thread.h" |
| 12 #include "mojo/shell/dynamic_service_runner.h" | 13 #include "mojo/shell/dynamic_service_runner.h" |
| 13 #include "mojo/shell/keep_alive.h" | 14 #include "mojo/shell/keep_alive.h" |
| 14 | 15 |
| 15 namespace mojo { | 16 namespace mojo { |
| 16 namespace shell { | 17 namespace shell { |
| 17 | 18 |
| 18 // An implementation of |DynamicServiceRunner| that loads/runs the given app | 19 // An implementation of |DynamicServiceRunner| that loads/runs the given app |
| 19 // (from the file system) on a separate thread (in the current process). | 20 // (from the file system) on a separate thread (in the current process). |
| 20 class InProcessDynamicServiceRunner | 21 class InProcessDynamicServiceRunner |
| (...skipping 10 matching lines...) Expand all Loading... |
| 31 | 32 |
| 32 private: | 33 private: |
| 33 // |base::DelegateSimpleThread::Delegate| method: | 34 // |base::DelegateSimpleThread::Delegate| method: |
| 34 virtual void Run() OVERRIDE; | 35 virtual void Run() OVERRIDE; |
| 35 | 36 |
| 36 KeepAlive keep_alive_; | 37 KeepAlive keep_alive_; |
| 37 base::FilePath app_path_; | 38 base::FilePath app_path_; |
| 38 ScopedMessagePipeHandle service_handle_; | 39 ScopedMessagePipeHandle service_handle_; |
| 39 base::Callback<bool(void)> app_completed_callback_runner_; | 40 base::Callback<bool(void)> app_completed_callback_runner_; |
| 40 | 41 |
| 42 base::ScopedNativeLibrary app_library_; |
| 41 base::DelegateSimpleThread thread_; | 43 base::DelegateSimpleThread thread_; |
| 42 | 44 |
| 43 DISALLOW_COPY_AND_ASSIGN(InProcessDynamicServiceRunner); | 45 DISALLOW_COPY_AND_ASSIGN(InProcessDynamicServiceRunner); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 typedef DynamicServiceRunnerFactoryImpl<InProcessDynamicServiceRunner> | 48 typedef DynamicServiceRunnerFactoryImpl<InProcessDynamicServiceRunner> |
| 47 InProcessDynamicServiceRunnerFactory; | 49 InProcessDynamicServiceRunnerFactory; |
| 48 | 50 |
| 49 } // namespace shell | 51 } // namespace shell |
| 50 } // namespace mojo | 52 } // namespace mojo |
| 51 | 53 |
| 52 #endif // MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_ | 54 #endif // MOJO_SHELL_IN_PROCESS_DYNAMIC_SERVICE_RUNNER_H_ |
| OLD | NEW |