Chromium Code Reviews| 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 6e4769fa3894482b63d1405d4c2adfa3f2aaedf5..26edf4deaf912a6dfb295780b2f465ef8088a80f 100644 |
| --- a/ui/views/mus/native_widget_mus.cc |
| +++ b/ui/views/mus/native_widget_mus.cc |
| @@ -44,7 +44,6 @@ |
| #include "ui/views/corewm/tooltip_aura.h" |
| #include "ui/views/corewm/tooltip_controller.h" |
| #include "ui/views/drag_utils.h" |
| -#include "ui/views/mus/desktop_window_tree_host_mus.h" |
| #include "ui/views/mus/drag_drop_client_mus.h" |
| #include "ui/views/mus/drop_target_mus.h" |
| #include "ui/views/mus/input_method_mus.h" |
| @@ -665,24 +664,24 @@ void NativeWidgetMus::ConfigurePropertiesForNewWindow( |
| mojo::ConvertTo<std::vector<uint8_t>>(init_params.name); |
| } |
| (*properties)[ui::mojom::WindowManager::kAlwaysOnTop_Property] = |
| - mojo::ConvertTo<std::vector<uint8_t>>(init_params.keep_on_top); |
| + mojo::ConvertTo<std::vector<uint8_t>>( |
| + static_cast<int64_t>(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<int32_t>( |
| + mojo::ConvertTo<std::vector<uint8_t>>(static_cast<int64_t>( |
|
sky
2016/11/30 03:17:28
optional as this code is going away at some point:
msw
2016/11/30 18:16:37
Done.
|
| mojo::ConvertTo<ui::mojom::WindowType>(init_params.type))); |
| - if (init_params.delegate && |
| - properties->count(ui::mojom::WindowManager::kResizeBehavior_Property) == |
| - 0) { |
| - (*properties)[ui::mojom::WindowManager::kResizeBehavior_Property] = |
| - mojo::ConvertTo<std::vector<uint8_t>>( |
| - DesktopWindowTreeHostMus::GetResizeBehaviorFromDelegate( |
| - init_params.delegate)); |
| - } |
| if (init_params.delegate) { |
| + if (properties->count(ui::mojom::WindowManager::kResizeBehavior_Property) == |
| + 0) { |
| + (*properties)[ui::mojom::WindowManager::kResizeBehavior_Property] = |
| + mojo::ConvertTo<std::vector<uint8_t>>( |
| + static_cast<int64_t>(init_params.delegate->GetResizeBehavior())); |
| + } |
| + |
| // TODO(crbug.com/667566): Support additional scales or gfx::Image[Skia]. |
| gfx::ImageSkia app_icon = init_params.delegate->GetWindowAppIcon(); |
| SkBitmap app_bitmap = app_icon.GetRepresentation(1.f).sk_bitmap(); |
| @@ -1325,10 +1324,11 @@ void NativeWidgetMus::OnSizeConstraintsChanged() { |
| if (!window_ || is_parallel_widget_in_window_manager()) |
| return; |
| + int32_t behavior = ui::mojom::kResizeBehaviorNone; |
| + if (GetWidget()->widget_delegate()) |
| + behavior = GetWidget()->widget_delegate()->GetResizeBehavior(); |
| window_->SetSharedProperty<int32_t>( |
| - ui::mojom::WindowManager::kResizeBehavior_Property, |
| - DesktopWindowTreeHostMus::GetResizeBehaviorFromDelegate( |
| - GetWidget()->widget_delegate())); |
| + ui::mojom::WindowManager::kResizeBehavior_Property, behavior); |
| } |
| void NativeWidgetMus::RepostNativeEvent(gfx::NativeEvent native_event) { |