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/macros.h" | 7 #include "base/macros.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
10 #include "components/mus/public/cpp/window.h" | 10 #include "components/mus/public/cpp/window.h" |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 mus::mojom::WindowManager::kWindowTitle_Property, title); | 474 mus::mojom::WindowManager::kWindowTitle_Property, title); |
475 return true; | 475 return true; |
476 } | 476 } |
477 | 477 |
478 void NativeWidgetMus::SetWindowIcons(const gfx::ImageSkia& window_icon, | 478 void NativeWidgetMus::SetWindowIcons(const gfx::ImageSkia& window_icon, |
479 const gfx::ImageSkia& app_icon) { | 479 const gfx::ImageSkia& app_icon) { |
480 // NOTIMPLEMENTED(); | 480 // NOTIMPLEMENTED(); |
481 } | 481 } |
482 | 482 |
483 void NativeWidgetMus::InitModalType(ui::ModalType modal_type) { | 483 void NativeWidgetMus::InitModalType(ui::ModalType modal_type) { |
484 // NOTIMPLEMENTED(); | 484 if (modal_type != ui::MODAL_TYPE_NONE) |
| 485 window_->SetModal(); |
485 } | 486 } |
486 | 487 |
487 gfx::Rect NativeWidgetMus::GetWindowBoundsInScreen() const { | 488 gfx::Rect NativeWidgetMus::GetWindowBoundsInScreen() const { |
488 return window_ ? window_->GetBoundsInRoot() : gfx::Rect(); | 489 return window_ ? window_->GetBoundsInRoot() : gfx::Rect(); |
489 } | 490 } |
490 | 491 |
491 gfx::Rect NativeWidgetMus::GetClientAreaBoundsInScreen() const { | 492 gfx::Rect NativeWidgetMus::GetClientAreaBoundsInScreen() const { |
492 // View-to-screen coordinate system transformations depend on this returning | 493 // View-to-screen coordinate system transformations depend on this returning |
493 // the full window bounds, for example View::ConvertPointToScreen(). | 494 // the full window bounds, for example View::ConvertPointToScreen(). |
494 return GetWindowBoundsInScreen(); | 495 return GetWindowBoundsInScreen(); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 | 856 |
856 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { | 857 void NativeWidgetMus::OnGestureEvent(ui::GestureEvent* event) { |
857 native_widget_delegate_->OnGestureEvent(event); | 858 native_widget_delegate_->OnGestureEvent(event); |
858 } | 859 } |
859 | 860 |
860 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { | 861 void NativeWidgetMus::OnHostCloseRequested(const aura::WindowTreeHost* host) { |
861 GetWidget()->Close(); | 862 GetWidget()->Close(); |
862 } | 863 } |
863 | 864 |
864 } // namespace views | 865 } // namespace views |
OLD | NEW |