summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_main_delegate.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 14:43:01 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-05 14:43:01 +0000
commitc6681f35e68c7689fdfd8794e0b1ec4cb92059e0 (patch)
tree9bc947f0a938e736e3660507ba47e7e6bac97a00 /chrome/app/chrome_main_delegate.h
parentc36a9e1dd2f21fce9ac430bd896b9f76e9a8eb73 (diff)
downloadchromium_src-c6681f35e68c7689fdfd8794e0b1ec4cb92059e0.zip
chromium_src-c6681f35e68c7689fdfd8794e0b1ec4cb92059e0.tar.gz
chromium_src-c6681f35e68c7689fdfd8794e0b1ec4cb92059e0.tar.bz2
Simplify how Content*Client interfaces are created. Instead of depending on the embedder to know when to create and set them and to handle special cases like zygote/single-process, directly ask the embedder to create an instance of a specific type. Also, if the embedder doesn't return an instance create the empty version.
Remove MockContentRendererClient since it existed before ContentRendererClient had an implementation and has no need anymore. Rename MockContentBrowserClient to TestContentBrowserClient to better reflect how it's used. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/10479023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_main_delegate.h')
-rw-r--r--chrome/app/chrome_main_delegate.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/chrome/app/chrome_main_delegate.h b/chrome/app/chrome_main_delegate.h
index 3e9b72a..faa1920 100644
--- a/chrome/app/chrome_main_delegate.h
+++ b/chrome/app/chrome_main_delegate.h
@@ -17,20 +17,15 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
ChromeMainDelegate();
virtual ~ChromeMainDelegate();
+ private:
+ // content::ContentMainDelegate implementation:
virtual bool BasicStartupComplete(int* exit_code) OVERRIDE;
-
-#if defined(OS_MACOSX)
- void InitMacCrashReporter(const CommandLine& command_line,
- const std::string& process_type);
-#endif // defined(OS_MACOSX)
-
virtual void PreSandboxStartup() OVERRIDE;
virtual void SandboxInitialized(const std::string& process_type) OVERRIDE;
virtual int RunProcess(
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(
const std::string& process_type) OVERRIDE;
@@ -41,8 +36,17 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
virtual content::ZygoteForkDelegate* ZygoteStarting() OVERRIDE;
virtual void ZygoteForked() OVERRIDE;
#endif
+ virtual content::ContentBrowserClient* CreateContentBrowserClient() OVERRIDE;
+ virtual content::ContentPluginClient* CreateContentPluginClient() OVERRIDE;
+ virtual content::ContentRendererClient*
+ CreateContentRendererClient() OVERRIDE;
+ virtual content::ContentUtilityClient* CreateContentUtilityClient() OVERRIDE;
+
+#if defined(OS_MACOSX)
+ void InitMacCrashReporter(const CommandLine& command_line,
+ const std::string& process_type);
+#endif // defined(OS_MACOSX)
- private:
chrome::ChromeContentClient chrome_content_client_;
scoped_ptr<base::StatsScope<base::StatsCounterTimer> > startup_timer_;