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/threading/thread_task_runner_handle.h" | 8 #include "base/threading/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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 aura::Window* NativeWidgetMus::GetRootWindow() { | 465 aura::Window* NativeWidgetMus::GetRootWindow() { |
466 return window_tree_host_->window(); | 466 return window_tree_host_->window(); |
467 } | 467 } |
468 | 468 |
469 void NativeWidgetMus::OnPlatformWindowClosed() { | 469 void NativeWidgetMus::OnPlatformWindowClosed() { |
470 native_widget_delegate_->OnNativeWidgetDestroying(); | 470 native_widget_delegate_->OnNativeWidgetDestroying(); |
471 | 471 |
472 window_tree_client_.reset(); // Uses |content_|. | 472 window_tree_client_.reset(); // Uses |content_|. |
473 capture_client_.reset(); // Uses |content_|. | 473 capture_client_.reset(); // Uses |content_|. |
474 | 474 |
| 475 cursor_manager_.reset(); // Uses |window_|. |
| 476 |
475 window_tree_host_->RemoveObserver(this); | 477 window_tree_host_->RemoveObserver(this); |
476 window_tree_host_.reset(); | 478 window_tree_host_.reset(); |
477 | 479 |
478 cursor_manager_.reset(); // Uses |window_|. | |
479 | |
480 mus_window_observer_.reset(nullptr); | 480 mus_window_observer_.reset(nullptr); |
481 | 481 |
482 window_ = nullptr; | 482 window_ = nullptr; |
483 content_ = nullptr; | 483 content_ = nullptr; |
484 | 484 |
485 native_widget_delegate_->OnNativeWidgetDestroyed(); | 485 native_widget_delegate_->OnNativeWidgetDestroyed(); |
486 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) | 486 if (ownership_ == Widget::InitParams::NATIVE_WIDGET_OWNS_WIDGET) |
487 delete this; | 487 delete this; |
488 } | 488 } |
489 | 489 |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 GetNativeWindow()->Show(); | 1223 GetNativeWindow()->Show(); |
1224 } else { | 1224 } else { |
1225 window_tree_host_->Hide(); | 1225 window_tree_host_->Hide(); |
1226 window_->SetVisible(false); | 1226 window_->SetVisible(false); |
1227 GetNativeWindow()->Hide(); | 1227 GetNativeWindow()->Hide(); |
1228 } | 1228 } |
1229 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); | 1229 native_widget_delegate_->OnNativeWidgetVisibilityChanged(window->visible()); |
1230 } | 1230 } |
1231 | 1231 |
1232 } // namespace views | 1232 } // namespace views |
OLD | NEW |