Index: ui/views/mus/native_widget_mus.cc |
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc |
index 2ec94cba4317731d457b11bb83012572bae1d94c..b2a92e7d4dca834b166100ca3b266ef6dbd302ef 100644 |
--- a/ui/views/mus/native_widget_mus.cc |
+++ b/ui/views/mus/native_widget_mus.cc |
@@ -376,8 +376,9 @@ ui::mojom::ShowState GetShowState(const ui::Window* window) { |
return ui::mojom::ShowState::DEFAULT; |
} |
- return static_cast<ui::mojom::ShowState>(window->GetSharedProperty<int32_t>( |
- ui::mojom::WindowManager::kShowState_Property)); |
+ return static_cast<ui::mojom::ShowState>( |
+ window->GetSharedProperty<aura::PropertyConverter::PrimitiveType>( |
+ ui::mojom::WindowManager::kShowState_Property)); |
} |
// Set the app or window icon property for the window. |
@@ -669,14 +670,14 @@ void NativeWidgetMus::ConfigurePropertiesForNewWindow( |
static_cast<aura::PropertyConverter::PrimitiveType>( |
init_params.keep_on_top)); |
- if (!Widget::RequiresNonClientView(init_params.type)) |
- return; |
- |
(*properties)[ui::mojom::WindowManager::kWindowType_Property] = |
mojo::ConvertTo<std::vector<uint8_t>>( |
static_cast<aura::PropertyConverter::PrimitiveType>( |
mojo::ConvertTo<ui::mojom::WindowType>(init_params.type))); |
+ if (!Widget::RequiresNonClientView(init_params.type)) |
+ return; |
+ |
if (init_params.delegate) { |
if (properties->count(ui::mojom::WindowManager::kResizeBehavior_Property) == |
0) { |
@@ -1331,7 +1332,7 @@ void NativeWidgetMus::OnSizeConstraintsChanged() { |
int32_t behavior = ui::mojom::kResizeBehaviorNone; |
if (GetWidget()->widget_delegate()) |
behavior = GetWidget()->widget_delegate()->GetResizeBehavior(); |
- window_->SetSharedProperty<int32_t>( |
+ window_->SetSharedProperty<aura::PropertyConverter::PrimitiveType>( |
ui::mojom::WindowManager::kResizeBehavior_Property, behavior); |
} |
@@ -1412,9 +1413,9 @@ void NativeWidgetMus::GetHitTestMask(gfx::Path* mask) const { |
void NativeWidgetMus::SetShowState(ui::mojom::ShowState show_state) { |
if (!window_) |
return; |
- window_->SetSharedProperty<int32_t>( |
+ window_->SetSharedProperty<aura::PropertyConverter::PrimitiveType>( |
James Cook
2016/12/05 17:21:49
nit: These statements are really long and ugly. Wo
sky
2016/12/05 17:56:55
Done.
|
ui::mojom::WindowManager::kShowState_Property, |
- static_cast<int32_t>(show_state)); |
+ static_cast<aura::PropertyConverter::PrimitiveType>(show_state)); |
} |
void NativeWidgetMus::OnKeyEvent(ui::KeyEvent* event) { |