Content settings: remove some plugin-related code/resources when... there are no...
[chromium-blink-merge.git] / content / public / browser / browser_main_runner.h
blob9eb6afbbaa27514683c1aa83d3540b96727e226b
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_BROWSER_BROWSER_MAIN_RUNNER_H_
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_
8 #include "base/basictypes.h"
9 #include "content/common/content_export.h"
11 namespace content {
13 struct MainFunctionParams;
15 // This class is responsible for browser initialization, running and shutdown.
16 class CONTENT_EXPORT BrowserMainRunner {
17 public:
18 virtual ~BrowserMainRunner() {}
20 // Create a new BrowserMainRunner object.
21 static BrowserMainRunner* Create();
23 // Returns true if the BrowserMainRunner has exited the main loop.
24 static bool ExitedMainMessageLoop();
26 // Initialize all necessary browser state. The |parameters| values will be
27 // copied. Returning a non-negative value indicates that initialization
28 // failed, and the returned value is used as the exit code for the process.
29 virtual int Initialize(const content::MainFunctionParams& parameters) = 0;
31 // Perform the default run logic.
32 virtual int Run() = 0;
34 // Shut down the browser state.
35 virtual void Shutdown() = 0;
38 } // namespace content
40 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_MAIN_RUNNER_H_