blob: dcde509e583aedd2bccb70e3ace8a0def853b09d [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/basictypes.h"
#include "content/common/content_export.h"
namespace content {
struct MainFunctionParams;
// This class is responsible for browser initialization, running and shutdown.
class CONTENT_EXPORT BrowserMainRunner {
virtual ~BrowserMainRunner() {}
// Create a new BrowserMainRunner object.
static BrowserMainRunner* Create();
// Initialize all necessary browser state. The |parameters| values will be
// copied. Returning a non-negative value indicates that initialization
// failed, and the returned value is used as the exit code for the process.
virtual int Initialize(const content::MainFunctionParams& parameters) = 0;
// Perform the default run logic.
virtual int Run() = 0;
// Shut down the browser state.
virtual void Shutdown() = 0;
} // namespace content