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

Unified Diff: chrome/browser/ui/views/frame/browser_frame_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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_frame_win.cc
diff --git a/chrome/browser/ui/views/frame/browser_frame_win.cc b/chrome/browser/ui/views/frame/browser_frame_win.cc
index 2b344c6663578753da3f94ceb3b0b85789e388f6..b641f359961d9fedeec8f6593973538ce9df50ab 100644
--- a/chrome/browser/ui/views/frame/browser_frame_win.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_win.cc
@@ -17,6 +17,7 @@
#include "ui/base/theme_provider.h"
#include "ui/gfx/font.h"
#include "views/screen.h"
+#include "views/views_delegate.h"
#include "views/widget/native_widget_win.h"
#include "views/widget/widget.h"
#include "views/window/non_client_view.h"
@@ -217,7 +218,8 @@ const gfx::Font& BrowserFrame::GetTitleFont() {
NativeBrowserFrame* NativeBrowserFrame::CreateNativeBrowserFrame(
BrowserFrame* browser_frame,
BrowserView* browser_view) {
- if (views::Widget::IsPureViews())
+ if (views::Widget::IsPureViews() &&
+ views::ViewsDelegate::views_delegate->GetDefaultParentView())
return new BrowserFrameViews(browser_frame, browser_view);
return new BrowserFrameWin(browser_frame, browser_view);
}
« no previous file with comments | « no previous file | chrome/browser/ui/views/tab_contents/native_tab_contents_container_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698