Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Unified Diff: ui/views/corewm/window_modality_controller.cc

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unneeded parens Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/corewm/transient_window_stacking_client_unittest.cc ('k') | ui/views/corewm/window_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/window_modality_controller.cc
diff --git a/ui/views/corewm/window_modality_controller.cc b/ui/views/corewm/window_modality_controller.cc
index b52a9d6ad8ce8da604870573fb9786b170a0fa85..d87f088e68b63aebddaa60bff5805950db2ca2d5 100644
--- a/ui/views/corewm/window_modality_controller.cc
+++ b/ui/views/corewm/window_modality_controller.cc
@@ -63,13 +63,13 @@ bool IsModalTransientChild(aura::Window* transient, aura::Window* original) {
aura::Window* GetModalTransientChild(
aura::Window* activatable,
aura::Window* original) {
- aura::Window::Windows::const_iterator it;
- for (it = activatable->transient_children().begin();
- it != activatable->transient_children().end();
+ for (aura::Window::Windows::const_iterator it =
+ GetTransientChildren(activatable).begin();
+ it != GetTransientChildren(activatable).end();
++it) {
aura::Window* transient = *it;
if (IsModalTransientChild(transient, original)) {
- return transient->transient_children().empty() ?
+ return GetTransientChildren(transient).empty() ?
transient : GetModalTransientChild(transient, original);
}
}
@@ -153,8 +153,8 @@ void WindowModalityController::OnWindowPropertyChanged(aura::Window* window,
window->GetProperty(aura::client::kModalKey) != ui::MODAL_TYPE_NONE &&
window->IsVisible()) {
ActivateWindow(window);
- ui::GestureRecognizer::Get()->TransferEventsTo(
- window->transient_parent(), NULL);
+ ui::GestureRecognizer::Get()->TransferEventsTo(GetTransientParent(window),
+ NULL);
}
}
@@ -163,8 +163,8 @@ void WindowModalityController::OnWindowVisibilityChanged(
bool visible) {
if (visible && window->GetProperty(aura::client::kModalKey) !=
ui::MODAL_TYPE_NONE) {
- ui::GestureRecognizer::Get()->TransferEventsTo(
- window->transient_parent(), NULL);
+ ui::GestureRecognizer::Get()->TransferEventsTo(GetTransientParent(window),
+ NULL);
// Make sure no other window has capture, otherwise |window| won't get mouse
// events.
aura::Window* capture_window = aura::client::GetCaptureWindow(window);
« no previous file with comments | « ui/views/corewm/transient_window_stacking_client_unittest.cc ('k') | ui/views/corewm/window_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698