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

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: 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 #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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 const gfx::Insets& client_area() const { return client_area_; } 79 const gfx::Insets& client_area() const { return client_area_; }
80 const std::vector<gfx::Rect>& additional_client_areas() { 80 const std::vector<gfx::Rect>& additional_client_areas() {
81 return additional_client_areas_; 81 return additional_client_areas_;
82 } 82 }
83 void SetClientArea(const gfx::Insets& new_client_area) { 83 void SetClientArea(const gfx::Insets& new_client_area) {
84 SetClientArea(new_client_area, std::vector<gfx::Rect>()); 84 SetClientArea(new_client_area, std::vector<gfx::Rect>());
85 } 85 }
86 void SetClientArea(const gfx::Insets& new_client_area, 86 void SetClientArea(const gfx::Insets& new_client_area,
87 const std::vector<gfx::Rect>& additional_client_areas); 87 const std::vector<gfx::Rect>& additional_client_areas);
88 88
89 // Mouse events outside the hit test mask do not hit the window.
90 const gfx::Rect& hit_test_mask() const { return hit_test_mask_; }
91 void SetHitTestMask(const gfx::Rect& mask_rect);
92
89 // Visibility (also see IsDrawn()). When created windows are hidden. 93 // Visibility (also see IsDrawn()). When created windows are hidden.
90 bool visible() const { return visible_; } 94 bool visible() const { return visible_; }
91 void SetVisible(bool value); 95 void SetVisible(bool value);
92 96
93 float opacity() const { return opacity_; } 97 float opacity() const { return opacity_; }
94 void SetOpacity(float opacity); 98 void SetOpacity(float opacity);
95 99
96 // Cursors 100 // Cursors
97 mojom::Cursor predefined_cursor() const { return cursor_id_; } 101 mojom::Cursor predefined_cursor() const { return cursor_id_; }
98 void SetPredefinedCursor(mus::mojom::Cursor cursor_id); 102 void SetPredefinedCursor(mus::mojom::Cursor cursor_id);
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 Children transient_children_; 318 Children transient_children_;
315 319
316 bool is_modal_; 320 bool is_modal_;
317 321
318 base::ObserverList<WindowObserver> observers_; 322 base::ObserverList<WindowObserver> observers_;
319 InputEventHandler* input_event_handler_; 323 InputEventHandler* input_event_handler_;
320 324
321 gfx::Rect bounds_; 325 gfx::Rect bounds_;
322 gfx::Insets client_area_; 326 gfx::Insets client_area_;
323 std::vector<gfx::Rect> additional_client_areas_; 327 std::vector<gfx::Rect> additional_client_areas_;
328 gfx::Rect hit_test_mask_;
324 329
325 mojom::ViewportMetricsPtr viewport_metrics_; 330 mojom::ViewportMetricsPtr viewport_metrics_;
326 331
327 bool visible_; 332 bool visible_;
328 float opacity_; 333 float opacity_;
329 334
330 mojom::Cursor cursor_id_; 335 mojom::Cursor cursor_id_;
331 336
332 SharedProperties properties_; 337 SharedProperties properties_;
333 338
(...skipping 11 matching lines...) Expand all
345 }; 350 };
346 351
347 std::map<const void*, Value> prop_map_; 352 std::map<const void*, Value> prop_map_;
348 353
349 DISALLOW_COPY_AND_ASSIGN(Window); 354 DISALLOW_COPY_AND_ASSIGN(Window);
350 }; 355 };
351 356
352 } // namespace mus 357 } // namespace mus
353 358
354 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_ 359 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698