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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 7717011: Get rid of static TabContentsView::Create function since the interface is in content, but the imp... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix mac build Created 9 years, 4 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: chrome/browser/chrome_content_browser_client.cc
===================================================================
--- chrome/browser/chrome_content_browser_client.cc (revision 97919)
+++ chrome/browser/chrome_content_browser_client.cc (working copy)
@@ -61,6 +61,7 @@
#include "content/browser/ssl/ssl_cert_error_handler.h"
#include "content/browser/ssl/ssl_client_auth_handler.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/worker_host/worker_process_host.h"
#include "content/common/desktop_notification_messages.h"
#include "grit/ui_resources.h"
@@ -73,6 +74,16 @@
#include "chrome/browser/crash_handler_host_linux.h"
#endif
+#if defined(TOOLKIT_VIEWS)
+#include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h"
+#elif defined(OS_LINUX)
+#include "chrome/browser/tab_contents/tab_contents_view_gtk.h"
+#elif defined(OS_MACOSX)
+#include "chrome/browser/tab_contents/tab_contents_view_mac.h"
+#elif defined(TOUCH_UI)
+#include "chrome/browser/ui/views/tab_contents/tab_contents_view_touch.h"
+#endif
+
#if defined(USE_NSS)
#include "chrome/browser/ui/crypto_module_password_dialog.h"
#endif
@@ -100,6 +111,21 @@
namespace chrome {
+TabContentsView* ChromeContentBrowserClient::CreateTabContentsView(
+ TabContents* tab_contents) {
+#if defined(TOOLKIT_VIEWS)
+ return new TabContentsViewViews(tab_contents);
+#elif defined(OS_LINUX)
+ return new TabContentsViewGtk(tab_contents);
+#elif defined(OS_MACOSX)
+ return tab_contents_view_mac::CreateTabContentsView(tab_contents);
+#elif defined(TOUCH_UI)
+ return new TabContentsViewTouch(tab_contents);
+#else
+#error Need to create your platform TabContentsView here.
+#endif
+}
+
void ChromeContentBrowserClient::RenderViewHostCreated(
RenderViewHost* render_view_host) {
new ChromeRenderViewHostObserver(render_view_host);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/tab_contents/tab_contents_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698