diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-20 20:30:20 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-20 20:31:45 +0000 |
commit | 26dae5835ebed7c8ee0864d44e25b5abcddbae23 (patch) | |
tree | c3cf1cf62c4151e25c0938b652d7fe81b5470007 /extensions/shell/app | |
parent | 87f3201f2d3d908de5620f1e63d5333484895d62 (diff) | |
download | chromium_src-26dae5835ebed7c8ee0864d44e25b5abcddbae23.zip chromium_src-26dae5835ebed7c8ee0864d44e25b5abcddbae23.tar.gz chromium_src-26dae5835ebed7c8ee0864d44e25b5abcddbae23.tar.bz2 |
app-shell: Remove ShellRendererMainDelegate.
ShellRendererMainDelegate is not used in athena or app-shell. So remove it.
Also, add interface methods in ShellMainDelegate for creating the
content-client or the renderer-client (like for browser-client) so that
athena can create its own version should it want to (e.g. to enable pdf
and/or other plugins, or override other features).
BUG=401242
R=jamescook@chromium.org, oshima@chromium.org
Review URL: https://codereview.chromium.org/464113004
Cr-Commit-Position: refs/heads/master@{#290908}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290908 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/shell/app')
-rw-r--r-- | extensions/shell/app/shell_main_delegate.cc | 26 | ||||
-rw-r--r-- | extensions/shell/app/shell_main_delegate.h | 7 |
2 files changed, 16 insertions, 17 deletions
diff --git a/extensions/shell/app/shell_main_delegate.cc b/extensions/shell/app/shell_main_delegate.cc index 1fae2d7..2d6fe6f 100644 --- a/extensions/shell/app/shell_main_delegate.cc +++ b/extensions/shell/app/shell_main_delegate.cc @@ -15,7 +15,6 @@ #include "extensions/shell/browser/shell_content_browser_client.h" #include "extensions/shell/common/shell_content_client.h" #include "extensions/shell/renderer/shell_content_renderer_client.h" -#include "extensions/shell/renderer/shell_renderer_main_delegate.h" #include "ui/base/resource/resource_bundle.h" #if defined(OS_CHROMEOS) @@ -54,7 +53,7 @@ ShellMainDelegate::~ShellMainDelegate() { bool ShellMainDelegate::BasicStartupComplete(int* exit_code) { InitLogging(); - content_client_.reset(new ShellContentClient); + content_client_.reset(CreateContentClient()); SetContentClient(content_client_.get()); #if defined(OS_CHROMEOS) @@ -80,15 +79,9 @@ content::ContentBrowserClient* ShellMainDelegate::CreateContentBrowserClient() { return browser_client_.get(); } -content::ContentBrowserClient* -ShellMainDelegate::CreateShellContentBrowserClient() { - return new ShellContentBrowserClient(new DefaultShellBrowserMainDelegate()); -} - content::ContentRendererClient* ShellMainDelegate::CreateContentRendererClient() { - renderer_client_.reset( - new ShellContentRendererClient(CreateShellRendererMainDelegate())); + renderer_client_.reset(CreateShellContentRendererClient()); return renderer_client_.get(); } @@ -99,9 +92,18 @@ void ShellMainDelegate::ZygoteStarting( #endif } -scoped_ptr<ShellRendererMainDelegate> -ShellMainDelegate::CreateShellRendererMainDelegate() { - return scoped_ptr<ShellRendererMainDelegate>(); +content::ContentClient* ShellMainDelegate::CreateContentClient() { + return new ShellContentClient(); +} + +content::ContentBrowserClient* +ShellMainDelegate::CreateShellContentBrowserClient() { + return new ShellContentBrowserClient(new DefaultShellBrowserMainDelegate()); +} + +content::ContentRendererClient* +ShellMainDelegate::CreateShellContentRendererClient() { + return new ShellContentRendererClient(); } void ShellMainDelegate::InitializeResourceBundle() { diff --git a/extensions/shell/app/shell_main_delegate.h b/extensions/shell/app/shell_main_delegate.h index b9999cc..a117d69 100644 --- a/extensions/shell/app/shell_main_delegate.h +++ b/extensions/shell/app/shell_main_delegate.h @@ -18,7 +18,6 @@ class ContentRendererClient; namespace extensions { class ShellBrowserMainDelegate; -class ShellRendererMainDelegate; class ShellMainDelegate : public content::ContentMainDelegate { public: @@ -36,11 +35,9 @@ class ShellMainDelegate : public content::ContentMainDelegate { protected: // The created object is owned by this object. + virtual content::ContentClient* CreateContentClient(); virtual content::ContentBrowserClient* CreateShellContentBrowserClient(); - - // The returned object is owned by ShellContentRendererClient. - virtual scoped_ptr<ShellRendererMainDelegate> - CreateShellRendererMainDelegate(); + virtual content::ContentRendererClient* CreateShellContentRendererClient(); // Initializes the resource bundle and resources.pak. virtual void InitializeResourceBundle(); |