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" |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 | 654 |
655 focus_client_.reset( | 655 focus_client_.reset( |
656 new wm::FocusController(new FocusRulesImpl(hosted_window))); | 656 new wm::FocusController(new FocusRulesImpl(hosted_window))); |
657 | 657 |
658 aura::client::SetFocusClient(hosted_window, focus_client_.get()); | 658 aura::client::SetFocusClient(hosted_window, focus_client_.get()); |
659 aura::client::SetActivationClient(hosted_window, focus_client_.get()); | 659 aura::client::SetActivationClient(hosted_window, focus_client_.get()); |
660 screen_position_client_.reset(new ScreenPositionClientMus(window_)); | 660 screen_position_client_.reset(new ScreenPositionClientMus(window_)); |
661 aura::client::SetScreenPositionClient(hosted_window, | 661 aura::client::SetScreenPositionClient(hosted_window, |
662 screen_position_client_.get()); | 662 screen_position_client_.get()); |
663 | 663 |
664 // TODO(erg): Remove this check when mash/wm/frame/move_event_handler.cc's | 664 // TODO(erg): Remove this check when ash/mus/frame/move_event_handler.cc's |
665 // direct usage of mus::Window::SetPredefinedCursor() is switched to a | 665 // direct usage of mus::Window::SetPredefinedCursor() is switched to a |
666 // private method on WindowManagerClient. | 666 // private method on WindowManagerClient. |
667 if (surface_type_ == mus::mojom::SurfaceType::DEFAULT) { | 667 if (surface_type_ == mus::mojom::SurfaceType::DEFAULT) { |
668 cursor_manager_.reset(new wm::CursorManager( | 668 cursor_manager_.reset(new wm::CursorManager( |
669 base::WrapUnique(new NativeCursorManagerMus(window_)))); | 669 base::WrapUnique(new NativeCursorManagerMus(window_)))); |
670 aura::client::SetCursorClient(hosted_window, cursor_manager_.get()); | 670 aura::client::SetCursorClient(hosted_window, cursor_manager_.get()); |
671 } | 671 } |
672 | 672 |
673 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window)); | 673 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window)); |
674 hosted_window->AddPreTargetHandler(focus_client_.get()); | 674 hosted_window->AddPreTargetHandler(focus_client_.get()); |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 | 1359 |
1360 gfx::Path mask_path; | 1360 gfx::Path mask_path; |
1361 native_widget_delegate_->GetHitTestMask(&mask_path); | 1361 native_widget_delegate_->GetHitTestMask(&mask_path); |
1362 // TODO(jamescook): Use the full path for the mask. | 1362 // TODO(jamescook): Use the full path for the mask. |
1363 gfx::Rect mask_rect = | 1363 gfx::Rect mask_rect = |
1364 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); | 1364 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); |
1365 window_->SetHitTestMask(mask_rect); | 1365 window_->SetHitTestMask(mask_rect); |
1366 } | 1366 } |
1367 | 1367 |
1368 } // namespace views | 1368 } // namespace views |
OLD | NEW |