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

Unified Diff: content/shell/shell_content_browser_client.cc

Issue 7906008: Create a very simple TabContentsView (and not fully implemented yet) and add more supporting code... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 3 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_content_browser_client.cc
===================================================================
--- content/shell/shell_content_browser_client.cc (revision 100929)
+++ content/shell/shell_content_browser_client.cc (working copy)
@@ -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 @@
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 @@
}
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() {
« content/shell/shell_browser_context.cc ('K') | « content/shell/shell_content_browser_client.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698