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