OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "ui/views/mus/native_widget_mus.h" | 5 #include "ui/views/mus/native_widget_mus.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
11 #include "components/mus/public/cpp/property_type_converters.h" | 11 #include "components/mus/public/cpp/property_type_converters.h" |
12 #include "components/mus/public/cpp/window.h" | 12 #include "components/mus/public/cpp/window.h" |
13 #include "components/mus/public/cpp/window_observer.h" | 13 #include "components/mus/public/cpp/window_observer.h" |
14 #include "components/mus/public/cpp/window_property.h" | 14 #include "components/mus/public/cpp/window_property.h" |
15 #include "components/mus/public/cpp/window_tree_connection.h" | 15 #include "components/mus/public/cpp/window_tree_connection.h" |
16 #include "components/mus/public/interfaces/cursor.mojom.h" | 16 #include "components/mus/public/interfaces/cursor.mojom.h" |
17 #include "components/mus/public/interfaces/window_manager.mojom.h" | 17 #include "components/mus/public/interfaces/window_manager.mojom.h" |
18 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" | 18 #include "components/mus/public/interfaces/window_manager_constants.mojom.h" |
19 #include "components/mus/public/interfaces/window_tree.mojom.h" | 19 #include "components/mus/public/interfaces/window_tree.mojom.h" |
20 #include "ui/aura/client/default_capture_client.h" | 20 #include "ui/aura/client/default_capture_client.h" |
21 #include "ui/aura/client/window_tree_client.h" | 21 #include "ui/aura/client/window_tree_client.h" |
22 #include "ui/aura/env.h" | 22 #include "ui/aura/env.h" |
23 #include "ui/aura/layout_manager.h" | 23 #include "ui/aura/layout_manager.h" |
24 #include "ui/aura/mus/mus_util.h" | 24 #include "ui/aura/mus/mus_util.h" |
25 #include "ui/aura/window.h" | 25 #include "ui/aura/window.h" |
26 #include "ui/aura/window_property.h" | 26 #include "ui/aura/window_property.h" |
27 #include "ui/base/hit_test.h" | 27 #include "ui/base/hit_test.h" |
28 #include "ui/events/event.h" | 28 #include "ui/events/event.h" |
29 #include "ui/gfx/canvas.h" | 29 #include "ui/gfx/canvas.h" |
30 #include "ui/gfx/geometry/mojo/geometry_type_converters.h" | |
31 #include "ui/gfx/path.h" | 30 #include "ui/gfx/path.h" |
32 #include "ui/native_theme/native_theme_aura.h" | 31 #include "ui/native_theme/native_theme_aura.h" |
33 #include "ui/platform_window/platform_window_delegate.h" | 32 #include "ui/platform_window/platform_window_delegate.h" |
34 #include "ui/views/mus/platform_window_mus.h" | 33 #include "ui/views/mus/platform_window_mus.h" |
35 #include "ui/views/mus/surface_context_factory.h" | 34 #include "ui/views/mus/surface_context_factory.h" |
36 #include "ui/views/mus/window_manager_constants_converters.h" | 35 #include "ui/views/mus/window_manager_constants_converters.h" |
37 #include "ui/views/mus/window_manager_frame_values.h" | 36 #include "ui/views/mus/window_manager_frame_values.h" |
38 #include "ui/views/mus/window_tree_host_mus.h" | 37 #include "ui/views/mus/window_tree_host_mus.h" |
39 #include "ui/views/widget/native_widget_aura.h" | 38 #include "ui/views/widget/native_widget_aura.h" |
40 #include "ui/views/widget/widget_delegate.h" | 39 #include "ui/views/widget/widget_delegate.h" |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 | 1358 |
1360 gfx::Path mask_path; | 1359 gfx::Path mask_path; |
1361 native_widget_delegate_->GetHitTestMask(&mask_path); | 1360 native_widget_delegate_->GetHitTestMask(&mask_path); |
1362 // TODO(jamescook): Use the full path for the mask. | 1361 // TODO(jamescook): Use the full path for the mask. |
1363 gfx::Rect mask_rect = | 1362 gfx::Rect mask_rect = |
1364 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); | 1363 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); |
1365 window_->SetHitTestMask(mask_rect); | 1364 window_->SetHitTestMask(mask_rect); |
1366 } | 1365 } |
1367 | 1366 |
1368 } // namespace views | 1367 } // namespace views |
OLD | NEW |