summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authormarshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-09 15:27:22 +0000
committermarshall@chromium.org <marshall@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-09 15:27:22 +0000
commite0a14c0dbf9df632b500466ec5128ffd721ee147 (patch)
treef1435cb448d9cf172aae311574240c754867672e /chrome/app
parent8be4e995299e5b106ab6ee633bb0040d6e758acf (diff)
downloadchromium_src-e0a14c0dbf9df632b500466ec5128ffd721ee147.zip
chromium_src-e0a14c0dbf9df632b500466ec5128ffd721ee147.tar.gz
chromium_src-e0a14c0dbf9df632b500466ec5128ffd721ee147.tar.bz2
Support sharing of ContentMain and BrowserMain code with embedded use cases (try #2).
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/9347022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121236 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/chrome_main.cc4
-rw-r--r--chrome/app/chrome_main_delegate.cc5
2 files changed, 3 insertions, 6 deletions
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index 93ff2e6..425932e 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// 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 "chrome/app/chrome_main_delegate.h"
-#include "content/app/content_main.h"
+#include "content/public/app/content_main.h"
#if defined(OS_WIN)
#define DLLEXPORT __declspec(dllexport)
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc
index ceabdb8..a742401 100644
--- a/chrome/app/chrome_main_delegate.cc
+++ b/chrome/app/chrome_main_delegate.cc
@@ -29,9 +29,7 @@
#include "chrome/plugin/chrome_content_plugin_client.h"
#include "chrome/renderer/chrome_content_renderer_client.h"
#include "chrome/utility/chrome_content_utility_client.h"
-#include "content/app/content_main.h"
#include "content/common/content_counters.h"
-#include "content/public/app/content_main_delegate.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_client.h"
#include "content/public/common/content_paths.h"
@@ -699,8 +697,7 @@ int ChromeMainDelegate::RunProcess(
return kMainFunctions[i].function(main_function_params);
}
- NOTREACHED() << "Unknown process type: " << process_type;
- return 1;
+ return -1;
}
void ChromeMainDelegate::ProcessExiting(const std::string& process_type) {