OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/ash/multi_user_window_manager.h" | 5 #include "chrome/browser/ui/ash/multi_user_window_manager.h" |
6 | 6 |
7 #include "apps/shell_window.h" | 7 #include "apps/shell_window.h" |
8 #include "apps/shell_window_registry.h" | 8 #include "apps/shell_window_registry.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/multi_profile_uma.h" | 10 #include "ash/multi_profile_uma.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // TODO(skuhne): "Open link in new window" will come here after the menu got | 63 // TODO(skuhne): "Open link in new window" will come here after the menu got |
64 // closed, executing the command from the nested menu loop. However at that | 64 // closed, executing the command from the nested menu loop. However at that |
65 // time there is no active event processed. A solution for that need to be | 65 // time there is no active event processed. A solution for that need to be |
66 // found past M-32. A global event handler filter (pre and post) might fix | 66 // found past M-32. A global event handler filter (pre and post) might fix |
67 // that problem in conjunction with a depth counter - but - for the menu | 67 // that problem in conjunction with a depth counter - but - for the menu |
68 // execution we come here after the loop was finished (so it's not nested | 68 // execution we come here after the loop was finished (so it's not nested |
69 // anymore) and the root window should therefore still have the event which | 69 // anymore) and the root window should therefore still have the event which |
70 // lead to the menu invocation, but it is not. By fixing that problem this | 70 // lead to the menu invocation, but it is not. By fixing that problem this |
71 // would "magically work". | 71 // would "magically work". |
72 aura::Window::Windows root_window_list = ash::Shell::GetAllRootWindows(); | 72 ash::Shell::RootWindowList root_window_list = ash::Shell::GetAllRootWindows(); |
73 for (aura::Window::Windows::iterator it = root_window_list.begin(); | 73 for (ash::Shell::RootWindowList::iterator it = root_window_list.begin(); |
74 it != root_window_list.end(); | 74 it != root_window_list.end(); |
75 ++it) { | 75 ++it) { |
76 if (IsUserEvent((*it)->GetDispatcher()->current_event())) | 76 if (IsUserEvent((*it)->current_event())) |
77 return true; | 77 return true; |
78 } | 78 } |
79 return false; | 79 return false; |
80 } | 80 } |
81 | 81 |
82 } // namespace | 82 } // namespace |
83 | 83 |
84 namespace chrome { | 84 namespace chrome { |
85 | 85 |
86 // Caching the current multi profile mode since the detection which mode is | 86 // Caching the current multi profile mode since the detection which mode is |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 // To prevent these commands from being recorded as any other commands, we | 644 // To prevent these commands from being recorded as any other commands, we |
645 // are suppressing any window entry changes while this is going on. | 645 // are suppressing any window entry changes while this is going on. |
646 // Instead of calling SetWindowVisible, only show gets called here since all | 646 // Instead of calling SetWindowVisible, only show gets called here since all |
647 // dependents have been shown previously already. | 647 // dependents have been shown previously already. |
648 base::AutoReset<bool> suppressor(&suppress_visibility_changes_, true); | 648 base::AutoReset<bool> suppressor(&suppress_visibility_changes_, true); |
649 window->Show(); | 649 window->Show(); |
650 } | 650 } |
651 } | 651 } |
652 | 652 |
653 } // namespace chrome | 653 } // namespace chrome |
OLD | NEW |