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_DYNAMIC_SERVICE_RUNNER_H_ | 5 #ifndef MOJO_SHELL_DYNAMIC_SERVICE_RUNNER_H_ |
6 #define MOJO_SHELL_DYNAMIC_SERVICE_RUNNER_H_ | 6 #define MOJO_SHELL_DYNAMIC_SERVICE_RUNNER_H_ |
7 | 7 |
8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "base/macros.h" | |
10 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
11 #include "mojo/public/cpp/system/core.h" | 10 #include "mojo/public/cpp/system/core.h" |
12 | 11 |
13 namespace base { | 12 namespace base { |
14 class FilePath; | 13 class FilePath; |
15 } | 14 } |
16 | 15 |
17 namespace mojo { | 16 namespace mojo { |
18 namespace shell { | 17 namespace shell { |
19 | 18 |
(...skipping 18 matching lines...) Expand all Loading... |
38 virtual ~DynamicServiceRunnerFactory() {} | 37 virtual ~DynamicServiceRunnerFactory() {} |
39 virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) = 0; | 38 virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) = 0; |
40 }; | 39 }; |
41 | 40 |
42 // A generic factory. | 41 // A generic factory. |
43 template <class DynamicServiceRunnerImpl> | 42 template <class DynamicServiceRunnerImpl> |
44 class DynamicServiceRunnerFactoryImpl : public DynamicServiceRunnerFactory { | 43 class DynamicServiceRunnerFactoryImpl : public DynamicServiceRunnerFactory { |
45 public: | 44 public: |
46 DynamicServiceRunnerFactoryImpl() {} | 45 DynamicServiceRunnerFactoryImpl() {} |
47 virtual ~DynamicServiceRunnerFactoryImpl() {} | 46 virtual ~DynamicServiceRunnerFactoryImpl() {} |
48 virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) OVERRIDE { | 47 virtual scoped_ptr<DynamicServiceRunner> Create(Context* context) override { |
49 return scoped_ptr<DynamicServiceRunner>( | 48 return scoped_ptr<DynamicServiceRunner>( |
50 new DynamicServiceRunnerImpl(context)); | 49 new DynamicServiceRunnerImpl(context)); |
51 } | 50 } |
52 }; | 51 }; |
53 | 52 |
54 } // namespace shell | 53 } // namespace shell |
55 } // namespace mojo | 54 } // namespace mojo |
56 | 55 |
57 #endif // MOJO_SHELL_DYNAMIC_SERVICE_RUNNER_H_ | 56 #endif // MOJO_SHELL_DYNAMIC_SERVICE_RUNNER_H_ |
OLD | NEW |