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 "ash/wm/window_util.h" | 7 #include "ash/wm/window_util.h" |
8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
9 #include "ui/aura/event.h" | 9 #include "ui/aura/event.h" |
10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
11 #include "ui/base/ui_base_types.h" | 11 #include "ui/base/ui_base_types.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 bool TransientChildIsWindowModal(aura::Window* window) { | 18 bool TransientChildIsWindowModal(aura::Window* window) { |
19 return window->GetIntProperty(aura::client::kModalKey) == | 19 return window->GetIntProperty(aura::client::kModalKey) == |
20 ui::MODAL_TYPE_WINDOW; | 20 ui::MODAL_TYPE_WINDOW; |
21 } | 21 } |
22 | 22 |
23 } | 23 } |
24 | 24 |
25 //////////////////////////////////////////////////////////////////////////////// | 25 //////////////////////////////////////////////////////////////////////////////// |
26 // WindowModalityController, public: | 26 // WindowModalityController, public: |
27 | 27 |
28 WindowModalityController::WindowModalityController() : aura::EventFilter(NULL) { | 28 WindowModalityController::WindowModalityController() { |
29 } | 29 } |
30 | 30 |
31 WindowModalityController::~WindowModalityController() { | 31 WindowModalityController::~WindowModalityController() { |
32 } | 32 } |
33 | 33 |
34 aura::Window* WindowModalityController::GetWindowModalTransient( | 34 aura::Window* WindowModalityController::GetWindowModalTransient( |
35 aura::Window* window) { | 35 aura::Window* window) { |
36 if (!window) | 36 if (!window) |
37 return NULL; | 37 return NULL; |
38 | 38 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 ui::GestureStatus WindowModalityController::PreHandleGestureEvent( | 75 ui::GestureStatus WindowModalityController::PreHandleGestureEvent( |
76 aura::Window* target, | 76 aura::Window* target, |
77 aura::GestureEvent* event) { | 77 aura::GestureEvent* event) { |
78 // TODO: make gestures work with modals. | 78 // TODO: make gestures work with modals. |
79 return ui::GESTURE_STATUS_UNKNOWN; | 79 return ui::GESTURE_STATUS_UNKNOWN; |
80 } | 80 } |
81 | 81 |
82 } // namespace internal | 82 } // namespace internal |
83 } // namespace ash | 83 } // namespace ash |
OLD | NEW |