From b0f146ff51b2b37a2e3549c875fb42365ded7a21 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Thu, 15 Sep 2011 22:14:25 +0000 Subject: Create a very simple TabContentsView (and not fully implemented yet) and add more supporting code to be able to load a page. Right now it's not rendering, but I suspect it's something small, and the patch has gotten large so I figure it's time to send it for review. BUG=90445 Review URL: http://codereview.chromium.org/7906008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101395 0039d316-1c4b-4281-b951-d872f2087c98 --- content/shell/shell_content_browser_client.cc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'content/shell/shell_content_browser_client.cc') diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc index 15ce376..5c6aa48 100644 --- a/content/shell/shell_content_browser_client.cc +++ b/content/shell/shell_content_browser_client.cc @@ -6,24 +6,36 @@ #include "base/file_path.h" #include "content/browser/webui/empty_web_ui_factory.h" +#include "content/shell/shell_browser_main.h" #include "googleurl/src/gurl.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "ui/base/clipboard/clipboard.h" #include "webkit/glue/webpreferences.h" +#if defined(OS_WIN) +#include "content/browser/tab_contents/tab_contents_view_win.h" +#endif + namespace content { +ShellContentBrowserClient::ShellContentBrowserClient() + : shell_browser_main_parts_(NULL) { +} + ShellContentBrowserClient::~ShellContentBrowserClient() { } BrowserMainParts* ShellContentBrowserClient::CreateBrowserMainParts( const MainFunctionParams& parameters) { - return NULL; + return new ShellBrowserMainParts(parameters); } TabContentsView* ShellContentBrowserClient::CreateTabContentsView( TabContents* tab_contents) { +#if defined(TOOLKIT_VIEWS) + return new TabContentsViewWin(tab_contents); +#else return NULL; +#endif } void ShellContentBrowserClient::RenderViewHostCreated( @@ -44,7 +56,7 @@ void ShellContentBrowserClient::WorkerProcessHostCreated( WebUIFactory* ShellContentBrowserClient::GetWebUIFactory() { // Return an empty factory so callsites don't have to check for NULL. - return EmptyWebUIFactory::Get(); + return EmptyWebUIFactory::GetInstance(); } GURL ShellContentBrowserClient::GetEffectiveURL( @@ -191,12 +203,11 @@ std::string ShellContentBrowserClient::GetWorkerProcessTitle( } ResourceDispatcherHost* ShellContentBrowserClient::GetResourceDispatcherHost() { - return NULL; + return shell_browser_main_parts_->GetResourceDispatcherHost(); } ui::Clipboard* ShellContentBrowserClient::GetClipboard() { - static ui::Clipboard clipboard; - return &clipboard; + return shell_browser_main_parts_->GetClipboard(); } MHTMLGenerationManager* ShellContentBrowserClient::GetMHTMLGenerationManager() { -- cgit v1.1