blob: 6cf7941ee5c98892ef539405aadda6ca4dab41e8 [file] [log] [blame]
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <memory>
#include "build/build_config.h"
#include "content/common/content_export.h"
namespace content {
struct ContentMainParams;
// This class is responsible for content initialization, running and shutdown.
class CONTENT_EXPORT ContentMainRunner {
virtual ~ContentMainRunner() {}
// Create a new ContentMainRunner object.
static std::unique_ptr<ContentMainRunner> Create();
// Initialize all necessary content state.
virtual int Initialize(ContentMainParams params) = 0;
// Some platforms (Android) can call Run() multiple times in different modes,
// use this method to reset the ContentMainParams it will use between runs.
virtual void ReInitializeParams(ContentMainParams new_params) = 0;
// Perform the default run logic.
virtual int Run() = 0;
// Shut down the content state.
virtual void Shutdown() = 0;
} // namespace content