Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2640)

Unified Diff: content/shell/shell_browser_main.cc

Issue 9190018: Support sharing of ContentMain and BrowserMain code with embedded use cases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/shell/shell_browser_main.cc
===================================================================
--- content/shell/shell_browser_main.cc (revision 117304)
+++ content/shell/shell_browser_main.cc (working copy)
@@ -16,6 +16,7 @@
#include "content/shell/shell.h"
#include "content/shell/shell_browser_context.h"
#include "content/shell/shell_content_browser_client.h"
+#include "content/shell/shell_main_delegate.h"
#include "net/base/net_module.h"
#include "ui/base/clipboard/clipboard.h"
@@ -31,8 +32,10 @@
}
ShellBrowserMainParts::ShellBrowserMainParts(
+ ShellMainDelegate* delegate,
const content::MainFunctionParams& parameters)
- : BrowserMainParts() {
+ : BrowserMainParts(),
+ delegate_(delegate) {
ShellContentBrowserClient* shell_browser_client =
static_cast<ShellContentBrowserClient*>(
content::GetContentClient()->browser());
@@ -42,6 +45,14 @@
ShellBrowserMainParts::~ShellBrowserMainParts() {
}
+MessageLoop* ShellBrowserMainParts::GetMainMessageLoop() {
+#if defined(TEST_EMBEDDED_MESSAGE_LOOP)
+ return delegate_->CreateBrowserMessageLoop();
+#else
+ return NULL;
+#endif
+}
+
void ShellBrowserMainParts::PreMainMessageLoopRun() {
browser_context_.reset(new ShellBrowserContext(this));

Powered by Google App Engine
This is Rietveld 408576698