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

Unified Diff: components/mus/ws/server_window.cc

Issue 1419793006: Makes windowmanager draw non-client area (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include 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 | « components/mus/ws/server_window.h ('k') | components/mus/ws/server_window_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/server_window.cc
diff --git a/components/mus/ws/server_window.cc b/components/mus/ws/server_window.cc
index 49a4d91ac601cb6c583ef7fe409a4fadde156240..b0348d407e03cbdb62743b8b3554102dbfe4986e 100644
--- a/components/mus/ws/server_window.cc
+++ b/components/mus/ws/server_window.cc
@@ -122,26 +122,20 @@ void ServerWindow::SetBounds(const gfx::Rect& bounds) {
// TODO(fsamuel): figure out how will this work with CompositorFrames.
- // |client_area_| is relative to the bounds. If the size of bounds change
- // we have to reset the client area. We assume any size change is quicky
- // followed by a client area change.
- if (bounds_.size() != bounds.size())
- client_area_ = gfx::Rect(bounds.size());
-
const gfx::Rect old_bounds = bounds_;
bounds_ = bounds;
FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
OnWindowBoundsChanged(this, old_bounds, bounds));
}
-void ServerWindow::SetClientArea(const gfx::Rect& bounds) {
- if (client_area_ == bounds)
+void ServerWindow::SetClientArea(const gfx::Insets& insets) {
+ if (client_area_ == insets)
return;
- const gfx::Rect old_client_area = client_area_;
- client_area_ = bounds;
+ const gfx::Insets old_client_area = client_area_;
+ client_area_ = insets;
FOR_EACH_OBSERVER(ServerWindowObserver, observers_,
- OnWindowClientAreaChanged(this, old_client_area, bounds));
+ OnWindowClientAreaChanged(this, old_client_area, insets));
}
const ServerWindow* ServerWindow::GetRoot() const {
« no previous file with comments | « components/mus/ws/server_window.h ('k') | components/mus/ws/server_window_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698