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

Side by Side Diff: components/mus/public/cpp/window.h

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
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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 const gfx::Insets& client_area() const { return client_area_; } 80 const gfx::Insets& client_area() const { return client_area_; }
81 const std::vector<gfx::Rect>& additional_client_areas() { 81 const std::vector<gfx::Rect>& additional_client_areas() {
82 return additional_client_areas_; 82 return additional_client_areas_;
83 } 83 }
84 void SetClientArea(const gfx::Insets& new_client_area) { 84 void SetClientArea(const gfx::Insets& new_client_area) {
85 SetClientArea(new_client_area, std::vector<gfx::Rect>()); 85 SetClientArea(new_client_area, std::vector<gfx::Rect>());
86 } 86 }
87 void SetClientArea(const gfx::Insets& new_client_area, 87 void SetClientArea(const gfx::Insets& new_client_area,
88 const std::vector<gfx::Rect>& additional_client_areas); 88 const std::vector<gfx::Rect>& additional_client_areas);
89 89
90 // Mouse events outside the hit test mask do not hit the window. Returns null
91 // if there is no mask.
92 const gfx::Rect* hit_test_mask() const { return hit_test_mask_.get(); }
93 void SetHitTestMask(const gfx::Rect& mask_rect);
94 void ClearHitTestMask();
95
90 // Visibility (also see IsDrawn()). When created windows are hidden. 96 // Visibility (also see IsDrawn()). When created windows are hidden.
91 bool visible() const { return visible_; } 97 bool visible() const { return visible_; }
92 void SetVisible(bool value); 98 void SetVisible(bool value);
93 99
94 float opacity() const { return opacity_; } 100 float opacity() const { return opacity_; }
95 void SetOpacity(float opacity); 101 void SetOpacity(float opacity);
96 102
97 // Cursors 103 // Cursors
98 mojom::Cursor predefined_cursor() const { return cursor_id_; } 104 mojom::Cursor predefined_cursor() const { return cursor_id_; }
99 void SetPredefinedCursor(mus::mojom::Cursor cursor_id); 105 void SetPredefinedCursor(mus::mojom::Cursor cursor_id);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 Children transient_children_; 322 Children transient_children_;
317 323
318 bool is_modal_; 324 bool is_modal_;
319 325
320 base::ObserverList<WindowObserver> observers_; 326 base::ObserverList<WindowObserver> observers_;
321 InputEventHandler* input_event_handler_; 327 InputEventHandler* input_event_handler_;
322 328
323 gfx::Rect bounds_; 329 gfx::Rect bounds_;
324 gfx::Insets client_area_; 330 gfx::Insets client_area_;
325 std::vector<gfx::Rect> additional_client_areas_; 331 std::vector<gfx::Rect> additional_client_areas_;
332 std::unique_ptr<gfx::Rect> hit_test_mask_;
326 333
327 mojom::ViewportMetricsPtr viewport_metrics_; 334 mojom::ViewportMetricsPtr viewport_metrics_;
328 335
329 bool visible_; 336 bool visible_;
330 float opacity_; 337 float opacity_;
331 338
332 mojom::Cursor cursor_id_; 339 mojom::Cursor cursor_id_;
333 340
334 SharedProperties properties_; 341 SharedProperties properties_;
335 342
(...skipping 11 matching lines...) Expand all
347 }; 354 };
348 355
349 std::map<const void*, Value> prop_map_; 356 std::map<const void*, Value> prop_map_;
350 357
351 DISALLOW_COPY_AND_ASSIGN(Window); 358 DISALLOW_COPY_AND_ASSIGN(Window);
352 }; 359 };
353 360
354 } // namespace mus 361 } // namespace mus
355 362
356 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 363 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
OLDNEW
« no previous file with comments | « components/mus/public/cpp/tests/test_window_tree.cc ('k') | components/mus/public/interfaces/window_tree.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698