summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_content_browser_client.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 22:14:25 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 22:14:25 +0000
commitb0f146ff51b2b37a2e3549c875fb42365ded7a21 (patch)
treefc4ee794e7feacbc3d73dfb763b5a90bb11f1041 /content/shell/shell_content_browser_client.cc
parent190efec7b7523f42c0f7e9a5ad80c79c3f68a7d1 (diff)
downloadchromium_src-b0f146ff51b2b37a2e3549c875fb42365ded7a21.zip
chromium_src-b0f146ff51b2b37a2e3549c875fb42365ded7a21.tar.gz
chromium_src-b0f146ff51b2b37a2e3549c875fb42365ded7a21.tar.bz2
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
Diffstat (limited to 'content/shell/shell_content_browser_client.cc')
-rw-r--r--content/shell/shell_content_browser_client.cc23
1 files changed, 17 insertions, 6 deletions
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() {