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/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 aura::client::SetActivationClient(hosted_window, focus_client_.get()); | 694 aura::client::SetActivationClient(hosted_window, focus_client_.get()); |
695 screen_position_client_.reset(new ScreenPositionClientMus(window_)); | 695 screen_position_client_.reset(new ScreenPositionClientMus(window_)); |
696 aura::client::SetScreenPositionClient(hosted_window, | 696 aura::client::SetScreenPositionClient(hosted_window, |
697 screen_position_client_.get()); | 697 screen_position_client_.get()); |
698 | 698 |
699 // TODO(erg): Remove this check when ash/mus/move_event_handler.cc's | 699 // TODO(erg): Remove this check when ash/mus/move_event_handler.cc's |
700 // direct usage of ui::Window::SetPredefinedCursor() is switched to a | 700 // direct usage of ui::Window::SetPredefinedCursor() is switched to a |
701 // private method on WindowManagerClient. | 701 // private method on WindowManagerClient. |
702 if (!is_parallel_widget_in_window_manager()) { | 702 if (!is_parallel_widget_in_window_manager()) { |
703 cursor_manager_.reset(new wm::CursorManager( | 703 cursor_manager_.reset(new wm::CursorManager( |
704 base::WrapUnique(new NativeCursorManagerMus(window_)))); | 704 base::MakeUnique<NativeCursorManagerMus>(window_))); |
705 aura::client::SetCursorClient(hosted_window, cursor_manager_.get()); | 705 aura::client::SetCursorClient(hosted_window, cursor_manager_.get()); |
706 } | 706 } |
707 | 707 |
708 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window)); | 708 window_tree_client_.reset(new NativeWidgetMusWindowTreeClient(hosted_window)); |
709 hosted_window->AddPreTargetHandler(focus_client_.get()); | 709 hosted_window->AddPreTargetHandler(focus_client_.get()); |
710 hosted_window->SetLayoutManager( | 710 hosted_window->SetLayoutManager( |
711 new ContentWindowLayoutManager(hosted_window, content_)); | 711 new ContentWindowLayoutManager(hosted_window, content_)); |
712 capture_client_.reset(new MusCaptureClient(hosted_window, content_, window_)); | 712 capture_client_.reset(new MusCaptureClient(hosted_window, content_, window_)); |
713 | 713 |
714 content_->SetType(ui::wm::WINDOW_TYPE_NORMAL); | 714 content_->SetType(ui::wm::WINDOW_TYPE_NORMAL); |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 | 1428 |
1429 gfx::Path mask_path; | 1429 gfx::Path mask_path; |
1430 native_widget_delegate_->GetHitTestMask(&mask_path); | 1430 native_widget_delegate_->GetHitTestMask(&mask_path); |
1431 // TODO(jamescook): Use the full path for the mask. | 1431 // TODO(jamescook): Use the full path for the mask. |
1432 gfx::Rect mask_rect = | 1432 gfx::Rect mask_rect = |
1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); | 1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); |
1434 window_->SetHitTestMask(mask_rect); | 1434 window_->SetHitTestMask(mask_rect); |
1435 } | 1435 } |
1436 | 1436 |
1437 } // namespace views | 1437 } // namespace views |
OLD | NEW |