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

Unified Diff: chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc

Issue 7285027: Require a default parent to use some Views implementations on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to avoid --use-pure-views startup crashes. Created 9 years, 6 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/ui/views/tab_contents/native_tab_contents_container_win.cc
diff --git a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc
index 163d59d89f17e0e020ab335263b59fed37f778f4..eea285c1d0df501b8eae6671e7a559f14e4b718f 100644
--- a/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc
+++ b/chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc
@@ -13,6 +13,7 @@
#include "content/browser/tab_contents/interstitial_page.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "ui/base/accessibility/accessible_view_state.h"
+#include "views/views_delegate.h"
#include "views/focus/focus_manager.h"
////////////////////////////////////////////////////////////////////////////////
@@ -157,7 +158,8 @@ gfx::NativeViewAccessible
// static
NativeTabContentsContainer* NativeTabContentsContainer::CreateNativeContainer(
TabContentsContainer* container) {
- if (views::Widget::IsPureViews())
+ if (views::Widget::IsPureViews() &&
+ views::ViewsDelegate::views_delegate->GetDefaultParentView())
return new NativeTabContentsContainerViews(container);
return new NativeTabContentsContainerWin(container);
}

Powered by Google App Engine
This is Rietveld 408576698