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