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