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

Side by Side Diff: components/mus/public/cpp/lib/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: add bug link for SkPath conversion 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
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/public/cpp/window.h" 5 #include "components/mus/public/cpp/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <set> 10 #include <set>
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const std::vector<gfx::Rect>& additional_client_areas) { 210 const std::vector<gfx::Rect>& additional_client_areas) {
211 if (!OwnsWindowOrIsRoot(this)) 211 if (!OwnsWindowOrIsRoot(this))
212 return; 212 return;
213 213
214 if (connection_) 214 if (connection_)
215 tree_client()->SetClientArea(server_id_, client_area, 215 tree_client()->SetClientArea(server_id_, client_area,
216 additional_client_areas); 216 additional_client_areas);
217 LocalSetClientArea(client_area, additional_client_areas); 217 LocalSetClientArea(client_area, additional_client_areas);
218 } 218 }
219 219
220 void Window::SetHitTestMask(const gfx::Rect& mask) {
221 if (!OwnsWindowOrIsRoot(this))
222 return;
223
224 if (connection_)
225 tree_client()->SetHitTestMask(server_id_, mask);
226 hit_test_mask_ = mask;
227 }
228
220 void Window::SetVisible(bool value) { 229 void Window::SetVisible(bool value) {
221 if (visible_ == value) 230 if (visible_ == value)
222 return; 231 return;
223 232
224 if (connection_) 233 if (connection_)
225 tree_client()->SetVisible(this, value); 234 tree_client()->SetVisible(this, value);
226 LocalSetVisible(value); 235 LocalSetVisible(value);
227 } 236 }
228 237
229 void Window::SetOpacity(float opacity) { 238 void Window::SetOpacity(float opacity) {
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 notifier->NotifyWindowReordered(); 881 notifier->NotifyWindowReordered();
873 882
874 return true; 883 return true;
875 } 884 }
876 885
877 // static 886 // static
878 Window** Window::GetStackingTarget(Window* window) { 887 Window** Window::GetStackingTarget(Window* window) {
879 return &window->stacking_target_; 888 return &window->stacking_target_;
880 } 889 }
881 } // namespace mus 890 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698