OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_ | 5 #ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_ |
6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_ | 6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_ |
7 | 7 |
| 8 #include "build/build_config.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
8 namespace content { | 11 namespace content { |
9 struct ContentMainParams; | 12 struct ContentMainParams; |
10 | 13 |
11 // This class is responsible for content initialization, running and shutdown. | 14 // This class is responsible for content initialization, running and shutdown. |
12 class ContentMainRunner { | 15 class CONTENT_EXPORT ContentMainRunner { |
13 public: | 16 public: |
14 virtual ~ContentMainRunner() {} | 17 virtual ~ContentMainRunner() {} |
15 | 18 |
16 // Create a new ContentMainRunner object. | 19 // Create a new ContentMainRunner object. |
17 static ContentMainRunner* Create(); | 20 static ContentMainRunner* Create(); |
18 | 21 |
19 // Initialize all necessary content state. | 22 // Initialize all necessary content state. |
20 virtual int Initialize(const ContentMainParams& params) = 0; | 23 virtual int Initialize(const ContentMainParams& params) = 0; |
21 | 24 |
22 // Perform the default run logic. | 25 // Perform the default run logic. |
23 virtual int Run() = 0; | 26 virtual int Run() = 0; |
24 | 27 |
25 // Shut down the content state. | 28 // Shut down the content state. |
26 virtual void Shutdown() = 0; | 29 virtual void Shutdown() = 0; |
27 }; | 30 }; |
28 | 31 |
29 } // namespace content | 32 } // namespace content |
30 | 33 |
31 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_ | 34 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_ |
OLD | NEW |