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

Side by Side Diff: components/mus/ws/server_window.cc

Issue 1991973003: mash: Preliminary support for widget hit test masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « components/mus/ws/server_window.h ('k') | components/mus/ws/window_finder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/ws/server_window.h" 5 #include "components/mus/ws/server_window.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return; 172 return;
173 } 173 }
174 174
175 additional_client_areas_ = additional_client_areas; 175 additional_client_areas_ = additional_client_areas;
176 client_area_ = insets; 176 client_area_ = insets;
177 FOR_EACH_OBSERVER( 177 FOR_EACH_OBSERVER(
178 ServerWindowObserver, observers_, 178 ServerWindowObserver, observers_,
179 OnWindowClientAreaChanged(this, insets, additional_client_areas)); 179 OnWindowClientAreaChanged(this, insets, additional_client_areas));
180 } 180 }
181 181
182 void ServerWindow::SetHitTestMask(const gfx::Rect& mask) {
183 hit_test_mask_.reset(new gfx::Rect(mask));
184 }
185
186 void ServerWindow::ClearHitTestMask() {
187 hit_test_mask_.reset();
188 }
189
182 const ServerWindow* ServerWindow::GetRoot() const { 190 const ServerWindow* ServerWindow::GetRoot() const {
183 return delegate_->GetRootWindow(this); 191 return delegate_->GetRootWindow(this);
184 } 192 }
185 193
186 std::vector<const ServerWindow*> ServerWindow::GetChildren() const { 194 std::vector<const ServerWindow*> ServerWindow::GetChildren() const {
187 std::vector<const ServerWindow*> children; 195 std::vector<const ServerWindow*> children;
188 children.reserve(children_.size()); 196 children.reserve(children_.size());
189 for (size_t i = 0; i < children_.size(); ++i) 197 for (size_t i = 0; i < children_.size(); ++i)
190 children.push_back(children_[i]); 198 children.push_back(children_[i]);
191 return children; 199 return children;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 } 462 }
455 463
456 // static 464 // static
457 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) { 465 ServerWindow** ServerWindow::GetStackingTarget(ServerWindow* window) {
458 return &window->stacking_target_; 466 return &window->stacking_target_;
459 } 467 }
460 468
461 } // namespace ws 469 } // namespace ws
462 470
463 } // namespace mus 471 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/server_window.h ('k') | components/mus/ws/window_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698