This source file includes following definitions.
- OnBeforeWidgetInit
#include "ui/views/test/desktop_test_views_delegate.h"
#include "ui/views/widget/native_widget_aura.h"
#if !defined(OS_CHROMEOS)
#include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
#endif
namespace views {
DesktopTestViewsDelegate::DesktopTestViewsDelegate() {}
DesktopTestViewsDelegate::~DesktopTestViewsDelegate() {}
void DesktopTestViewsDelegate::OnBeforeWidgetInit(
Widget::InitParams* params,
internal::NativeWidgetDelegate* delegate) {
#if !defined(OS_CHROMEOS)
if (params->native_widget)
return;
if (params->parent && params->type != views::Widget::InitParams::TYPE_MENU) {
params->native_widget = new views::NativeWidgetAura(delegate);
} else if (!params->parent && !params->context) {
params->native_widget = new views::DesktopNativeWidgetAura(delegate);
}
#endif
}
}