Merge pull request #815 from frankhale/force-native-window

Force native window
This commit is contained in:
Cheng Zhao 2014-11-12 14:24:13 +08:00
commit cf7cf098d8

View file

@ -237,6 +237,11 @@ NativeWindowViews::NativeWindowViews(content::WebContents* web_contents,
} }
#endif #endif
if (has_frame_) {
window_->set_frame_type(views::Widget::FrameType::FRAME_TYPE_FORCE_NATIVE);
window_->FrameTypeChanged();
}
window_->UpdateWindowIcon(); window_->UpdateWindowIcon();
window_->CenterWindow(bounds.size()); window_->CenterWindow(bounds.size());
Layout(); Layout();
@ -670,11 +675,9 @@ views::ClientView* NativeWindowViews::CreateClientView(views::Widget* widget) {
views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView( views::NonClientFrameView* NativeWindowViews::CreateNonClientFrameView(
views::Widget* widget) { views::Widget* widget) {
#if defined(OS_WIN) #if defined(OS_WIN)
if (ui::win::IsAeroGlassEnabled()) {
WinFrameView* frame_view = new WinFrameView; WinFrameView* frame_view = new WinFrameView;
frame_view->Init(this, widget); frame_view->Init(this, widget);
return frame_view; return frame_view;
}
#elif defined(OS_LINUX) #elif defined(OS_LINUX)
if (has_frame_) { if (has_frame_) {
return new views::NativeFrameView(widget); return new views::NativeFrameView(widget);