diff options
author | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-10 15:58:52 +0000 |
---|---|---|
committer | marshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-10 15:58:52 +0000 |
commit | f573ed6b419616e8d2ff7932d931be3c57105e14 (patch) | |
tree | 2b0e957536241765f67b5b2b6a532f342b802fa2 /content/app/content_main.h | |
parent | 0818ff1493b5acc658b881b0e7709f5440b3aef4 (diff) | |
download | chromium_src-f573ed6b419616e8d2ff7932d931be3c57105e14.zip chromium_src-f573ed6b419616e8d2ff7932d931be3c57105e14.tar.gz chromium_src-f573ed6b419616e8d2ff7932d931be3c57105e14.tar.bz2 |
Support sharing of ContentMain and BrowserMain code with embedded use cases (try #3).
For the browser use case it is convenient to have a single ContentMain entry point function that handles all initialization, run and shutdown. For embedded use cases it is often necessary to integrate with existing application message loops where initialization and shutdown must be handled separately.
To support sharing of this code the following changes were required:
1. Refactor the ContentMain function to create a ContentMainRunner class containing separate initialization, run and shutdown functions.
2. Refactor the BrowserMain function and BrowserMainLoop class to create a BrowserMainRunner class containing separate initialization, run and shutdown functions.
3. Add a new BrowserMainParts::GetMainMessageLoop method. This is necessary to support creation of a custom MessageLoop implementation while sharing BrowserMainRunner initialization and shutdown code.
BUG=112507
TEST=none
Review URL: https://chromiumcodereview.appspot.com/9375017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app/content_main.h')
-rw-r--r-- | content/app/content_main.h | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/content/app/content_main.h b/content/app/content_main.h deleted file mode 100644 index c35b589..0000000 --- a/content/app/content_main.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2011 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. - -#ifndef CONTENT_APP_CONTENT_MAIN_H_ -#define CONTENT_APP_CONTENT_MAIN_H_ -#pragma once - -#include "build/build_config.h" -#include "content/common/content_export.h" - -#if defined(OS_WIN) -#include <windows.h> -#endif - -namespace sandbox { -struct SandboxInterfaceInfo; -} - -namespace content { - -class ContentMainDelegate; - -// ContentMain should be called from the embedder's main() function to do the -// initial setup for every process. The embedder has a chance to customize -// startup using the ContentMainDelegate interface. The embedder can also pass -// in NULL for |delegate| if they don't want to override default startup. -#if defined(OS_WIN) - -// |sandbox_info| should be initialized using InitializeSandboxInfo from -// content_main_win.h -CONTENT_EXPORT int ContentMain(HINSTANCE instance, - sandbox::SandboxInterfaceInfo* sandbox_info, - ContentMainDelegate* delegate); -#else -CONTENT_EXPORT int ContentMain(int argc, - const char** argv, - ContentMainDelegate* delegate); -#endif - -} // namespace content - -#endif // CONTENT_APP_CONTENT_MAIN_H_ |