| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/wm/window_modality_controller.h" | 5 #include "ash/wm/window_modality_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
| 10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
| 11 #include "ui/aura/client/capture_client.h" | 11 #include "ui/aura/client/capture_client.h" |
| 12 #include "ui/aura/env.h" | 12 #include "ui/aura/env.h" |
| 13 #include "ui/aura/root_window.h" | 13 #include "ui/aura/root_window.h" |
| 14 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
| 15 #include "ui/base/event.h" | 15 #include "ui/base/events/event.h" |
| 16 #include "ui/base/ui_base_types.h" | 16 #include "ui/base/ui_base_types.h" |
| 17 | 17 |
| 18 namespace ash { | 18 namespace ash { |
| 19 | 19 |
| 20 namespace wm { | 20 namespace wm { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 bool TransientChildIsWindowModal(aura::Window* window) { | 24 bool TransientChildIsWindowModal(aura::Window* window) { |
| 25 return window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_WINDOW; | 25 return window->GetProperty(aura::client::kModalKey) == ui::MODAL_TYPE_WINDOW; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 aura::Window* modal_transient_child = wm::GetWindowModalTransient(target); | 126 aura::Window* modal_transient_child = wm::GetWindowModalTransient(target); |
| 127 if (modal_transient_child && (event->type() == ui::ET_MOUSE_PRESSED || | 127 if (modal_transient_child && (event->type() == ui::ET_MOUSE_PRESSED || |
| 128 event->type() == ui::ET_TOUCH_PRESSED)) { | 128 event->type() == ui::ET_TOUCH_PRESSED)) { |
| 129 wm::ActivateWindow(modal_transient_child); | 129 wm::ActivateWindow(modal_transient_child); |
| 130 } | 130 } |
| 131 return !!modal_transient_child; | 131 return !!modal_transient_child; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace internal | 134 } // namespace internal |
| 135 } // namespace ash | 135 } // namespace ash |
| OLD | NEW |