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)); |