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

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 1456233002: Converts remaining windowmanager property based functions to SetProperty (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « mash/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 578c9ea19810f9a6102a0c176fdfe3b9fc5e7619..eaea4f7fe8056e8574e3f9e7e4ca2d04d9d35376 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -7,6 +7,7 @@
#include "base/thread_task_runner_handle.h"
#include "components/mus/public/cpp/property_type_converters.h"
#include "components/mus/public/cpp/window.h"
+#include "components/mus/public/cpp/window_property.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "ui/aura/client/default_capture_client.h"
#include "ui/aura/client/window_tree_client.h"
@@ -378,7 +379,8 @@ ui::InputMethod* NativeWidgetMus::GetInputMethod() {
void NativeWidgetMus::CenterWindow(const gfx::Size& size) {
// TODO(beng): clear user-placed property and set preferred size property.
- window_->SetPreferredSize(size);
+ window_->SetSharedProperty<gfx::Size>(
+ mus::mojom::WindowManager::kPreferredSize_Property, size);
}
void NativeWidgetMus::GetWindowPlacement(
@@ -642,7 +644,8 @@ bool NativeWidgetMus::IsTranslucentWindowOpacitySupported() const {
}
void NativeWidgetMus::OnSizeConstraintsChanged() {
- window_->SetResizeBehavior(
+ window_->SetSharedProperty<int32_t>(
+ mus::mojom::WindowManager::kResizeBehavior_Property,
ResizeBehaviorFromDelegate(GetWidget()->widget_delegate()));
}
« no previous file with comments | « mash/wm/window_manager_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698