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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_
6 #define CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_
8 #include "build/build_config.h"
9 #include "content/common/content_export.h"
12 struct ContentMainParams
;
14 // This class is responsible for content initialization, running and shutdown.
15 class CONTENT_EXPORT ContentMainRunner
{
17 virtual ~ContentMainRunner() {}
19 // Create a new ContentMainRunner object.
20 static ContentMainRunner
* Create();
22 // Initialize all necessary content state.
23 virtual int Initialize(const ContentMainParams
& params
) = 0;
25 // Perform the default run logic.
26 virtual int Run() = 0;
28 // Shut down the content state.
29 virtual void Shutdown() = 0;
32 } // namespace content
34 #endif // CONTENT_PUBLIC_APP_CONTENT_MAIN_RUNNER_H_