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

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

Issue 1953293004: PlatformWindowMus::SetBounds to NativeWidgetMus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Drop WIP testing code Created 4 years, 7 months 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 | « no previous file | ui/views/mus/platform_window_mus.h » ('j') | ui/views/mus/platform_window_mus.cc » ('J')
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 3f2e687781d3d6b8b84772df1b3a4def20fc69e8..cf1795b9ee506fdec0bf404afc8c940a7aa55d95 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -711,7 +711,7 @@ std::string NativeWidgetMus::GetWorkspace() const {
}
void NativeWidgetMus::SetBounds(const gfx::Rect& bounds) {
- if (!window_tree_host_)
+ if (!(window_ && window_tree_host_))
return;
gfx::Size size(bounds.size());
@@ -721,6 +721,7 @@ void NativeWidgetMus::SetBounds(const gfx::Rect& bounds) {
size.SetToMin(max_size);
size.SetToMax(min_size);
window_tree_host_->SetBounds(gfx::Rect(bounds.origin(), size));
+ window_->SetBounds(gfx::Rect(bounds.origin(), size));
}
void NativeWidgetMus::SetSize(const gfx::Size& size) {
@@ -798,8 +799,8 @@ bool NativeWidgetMus::IsVisible() const {
}
void NativeWidgetMus::Activate() {
- if (window_tree_host_)
- window_tree_host_->platform_window()->Activate();
+ if (window_)
+ window_->SetFocus();
}
void NativeWidgetMus::Deactivate() {
« no previous file with comments | « no previous file | ui/views/mus/platform_window_mus.h » ('j') | ui/views/mus/platform_window_mus.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698