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/display/window_tree_host_manager.h" | 5 #include "ash/display/window_tree_host_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 // doesn't exist, or b) the primary_id has already been | 855 // doesn't exist, or b) the primary_id has already been |
856 // set to the same and didn't update it. | 856 // set to the same and didn't update it. |
857 layout_store->UpdatePrimaryDisplayId( | 857 layout_store->UpdatePrimaryDisplayId( |
858 pair, Shell::GetScreen()->GetPrimaryDisplay().id()); | 858 pair, Shell::GetScreen()->GetPrimaryDisplay().id()); |
859 } | 859 } |
860 } | 860 } |
861 FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged()); | 861 FOR_EACH_OBSERVER(Observer, observers_, OnDisplayConfigurationChanged()); |
862 UpdateMouseLocationAfterDisplayChange(); | 862 UpdateMouseLocationAfterDisplayChange(); |
863 } | 863 } |
864 | 864 |
865 bool WindowTreeHostManager::DispatchKeyEventPostIME(const ui::KeyEvent& event) { | 865 ui::EventDispatchDetails WindowTreeHostManager::DispatchKeyEventPostIME( |
| 866 ui::KeyEvent* event) { |
866 // Getting the active root window to dispatch the event. This isn't | 867 // Getting the active root window to dispatch the event. This isn't |
867 // significant as the event will be sent to the window resolved by | 868 // significant as the event will be sent to the window resolved by |
868 // aura::client::FocusClient which is FocusController in ash. | 869 // aura::client::FocusClient which is FocusController in ash. |
869 aura::Window* active_window = wm::GetActiveWindow(); | 870 aura::Window* active_window = wm::GetActiveWindow(); |
870 aura::Window* root_window = active_window ? active_window->GetRootWindow() | 871 aura::Window* root_window = active_window ? active_window->GetRootWindow() |
871 : Shell::GetPrimaryRootWindow(); | 872 : Shell::GetPrimaryRootWindow(); |
872 return root_window->GetHost()->DispatchKeyEventPostIME(event); | 873 return root_window->GetHost()->DispatchKeyEventPostIME(event); |
873 } | 874 } |
874 | 875 |
875 AshWindowTreeHost* WindowTreeHostManager::AddWindowTreeHostForDisplay( | 876 AshWindowTreeHost* WindowTreeHostManager::AddWindowTreeHostForDisplay( |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 ->display_configurator_animation() | 925 ->display_configurator_animation() |
925 ->StartFadeInAnimation(); | 926 ->StartFadeInAnimation(); |
926 #endif | 927 #endif |
927 } | 928 } |
928 | 929 |
929 void WindowTreeHostManager::SetMirrorModeAfterAnimation(bool mirror) { | 930 void WindowTreeHostManager::SetMirrorModeAfterAnimation(bool mirror) { |
930 GetDisplayManager()->SetMirrorMode(mirror); | 931 GetDisplayManager()->SetMirrorMode(mirror); |
931 } | 932 } |
932 | 933 |
933 } // namespace ash | 934 } // namespace ash |
OLD | NEW |