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

Unified Diff: components/mus/public/cpp/lib/window_tree_client_impl.cc

Issue 1419793006: Makes windowmanager draw non-client area (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move wm nonclientframeview to wm 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
Index: components/mus/public/cpp/lib/window_tree_client_impl.cc
diff --git a/components/mus/public/cpp/lib/window_tree_client_impl.cc b/components/mus/public/cpp/lib/window_tree_client_impl.cc
index 2191af5591b32418f34555f44262b96b2aa3ad17..fe14de325bb4668d8dfc0ac88b490eadf5585a4a 100644
--- a/components/mus/public/cpp/lib/window_tree_client_impl.cc
+++ b/components/mus/public/cpp/lib/window_tree_client_impl.cc
@@ -15,6 +15,7 @@
#include "mojo/application/public/cpp/service_provider_impl.h"
#include "mojo/application/public/interfaces/service_provider.mojom.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
+#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/size.h"
namespace mus {
@@ -168,9 +169,9 @@ void WindowTreeClientImpl::SetBounds(Id window_id, const gfx::Rect& bounds) {
}
void WindowTreeClientImpl::SetClientArea(Id window_id,
- const gfx::Rect& client_area) {
+ const gfx::Insets& client_area) {
DCHECK(tree_);
- tree_->SetClientArea(window_id, mojo::Rect::From(client_area));
+ tree_->SetClientArea(window_id, mojo::Insets::From(client_area));
}
void WindowTreeClientImpl::SetFocus(Id window_id) {
@@ -353,12 +354,13 @@ void WindowTreeClientImpl::OnWindowBoundsChanged(Id window_id,
.LocalSetBounds(old_bounds.To<gfx::Rect>(), new_bounds.To<gfx::Rect>());
}
-void WindowTreeClientImpl::OnClientAreaChanged(uint32_t window_id,
- mojo::RectPtr old_client_area,
- mojo::RectPtr new_client_area) {
+void WindowTreeClientImpl::OnClientAreaChanged(
+ uint32_t window_id,
+ mojo::InsetsPtr old_client_area,
+ mojo::InsetsPtr new_client_area) {
Window* window = GetWindowById(window_id);
if (window)
- WindowPrivate(window).LocalSetClientArea(new_client_area.To<gfx::Rect>());
+ WindowPrivate(window).LocalSetClientArea(new_client_area.To<gfx::Insets>());
}
namespace {

Powered by Google App Engine
This is Rietveld 408576698