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

Unified Diff: content/shell/shell_main_delegate.h

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_main_delegate.h
===================================================================
--- content/shell/shell_main_delegate.h (revision 117304)
+++ content/shell/shell_main_delegate.h (working copy)
@@ -8,9 +8,16 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+#include "content/shell/shell.h"
#include "content/shell/shell_content_client.h"
#include "content/public/app/content_main_delegate.h"
+#if defined(TEST_EMBEDDED_MESSAGE_LOOP)
+#include "content/browser/browser_main_runner.h"
+#endif
+
+class MessageLoop;
+
namespace content {
class ShellContentBrowserClient;
class ShellContentRendererClient;
@@ -26,9 +33,12 @@
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
virtual void PreSandboxStartup() OVERRIDE;
virtual void SandboxInitialized(const std::string& process_type) OVERRIDE;
- virtual int RunProcess(
+ virtual int RunKnownProcess(
const std::string& process_type,
const content::MainFunctionParams& main_function_params) OVERRIDE;
+ virtual int RunUnknownProcess(
+ const std::string& process_type,
+ const content::MainFunctionParams& main_function_params) OVERRIDE;
virtual void ProcessExiting(const std::string& process_type) OVERRIDE;
#if defined(OS_MACOSX)
virtual bool ProcessRegistersWithSystemProcess(
@@ -41,9 +51,19 @@
virtual void ZygoteForked() OVERRIDE;
#endif // OS_MACOSX
+#if defined(TEST_EMBEDDED_MESSAGE_LOOP)
+ MessageLoop* CreateBrowserMessageLoop();
+ void DoBrowserMessageLoopWork();
+ void ShutdownBrowser();
+#endif
+
private:
void InitializeShellContentClient(const std::string& process_type);
+#if defined(TEST_EMBEDDED_MESSAGE_LOOP)
+ scoped_ptr<content::BrowserMainRunner> browser_runner_;
+#endif
+
scoped_ptr<content::ShellContentBrowserClient> browser_client_;
scoped_ptr<content::ShellContentRendererClient> renderer_client_;
scoped_ptr<content::ShellContentPluginClient> plugin_client_;

Powered by Google App Engine
This is Rietveld 408576698