| 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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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); |
| 715 content_->Init(params.layer_type); | 715 content_->Init(params.layer_type); |
| 716 if (window_->visible()) | 716 if (window_->visible()) |
| 717 content_->Show(); | 717 content_->Show(); |
| 718 content_->SetTransparent(true); | 718 content_->SetTransparent(true); |
| 719 content_->SetFillsBoundsCompletely(false); | 719 content_->SetFillsBoundsCompletely(false); |
| 720 content_->set_ignore_events(!params.accept_events); |
| 720 hosted_window->AddChild(content_); | 721 hosted_window->AddChild(content_); |
| 721 | 722 |
| 722 // Set-up transiency if appropriate. | 723 // Set-up transiency if appropriate. |
| 723 if (params.parent && !params.child) { | 724 if (params.parent && !params.child) { |
| 724 aura::Window* parent_root = params.parent->GetRootWindow(); | 725 aura::Window* parent_root = params.parent->GetRootWindow(); |
| 725 ui::Window* parent_mus = parent_root->GetProperty(kMusWindow); | 726 ui::Window* parent_mus = parent_root->GetProperty(kMusWindow); |
| 726 if (parent_mus) | 727 if (parent_mus) |
| 727 parent_mus->AddTransientWindow(window_); | 728 parent_mus->AddTransientWindow(window_); |
| 728 } | 729 } |
| 729 | 730 |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 | 1429 |
| 1429 gfx::Path mask_path; | 1430 gfx::Path mask_path; |
| 1430 native_widget_delegate_->GetHitTestMask(&mask_path); | 1431 native_widget_delegate_->GetHitTestMask(&mask_path); |
| 1431 // TODO(jamescook): Use the full path for the mask. | 1432 // TODO(jamescook): Use the full path for the mask. |
| 1432 gfx::Rect mask_rect = | 1433 gfx::Rect mask_rect = |
| 1433 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); | 1434 gfx::ToEnclosingRect(gfx::SkRectToRectF(mask_path.getBounds())); |
| 1434 window_->SetHitTestMask(mask_rect); | 1435 window_->SetHitTestMask(mask_rect); |
| 1435 } | 1436 } |
| 1436 | 1437 |
| 1437 } // namespace views | 1438 } // namespace views |
| OLD | NEW |