Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: ash/display/window_tree_host_manager.cc

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Remove comment. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <memory> 10 #include <memory>
(...skipping 11 matching lines...) Expand all
22 #include "ash/magnifier/magnification_controller.h" 22 #include "ash/magnifier/magnification_controller.h"
23 #include "ash/magnifier/partial_magnification_controller.h" 23 #include "ash/magnifier/partial_magnification_controller.h"
24 #include "ash/root_window_controller.h" 24 #include "ash/root_window_controller.h"
25 #include "ash/root_window_settings.h" 25 #include "ash/root_window_settings.h"
26 #include "ash/shell.h" 26 #include "ash/shell.h"
27 #include "ash/wm/window_util.h" 27 #include "ash/wm/window_util.h"
28 #include "base/command_line.h" 28 #include "base/command_line.h"
29 #include "base/strings/stringprintf.h" 29 #include "base/strings/stringprintf.h"
30 #include "base/strings/utf_string_conversions.h" 30 #include "base/strings/utf_string_conversions.h"
31 #include "base/threading/thread_task_runner_handle.h" 31 #include "base/threading/thread_task_runner_handle.h"
32 #include "grit/ash_strings.h"
33 #include "ui/aura/client/capture_client.h" 32 #include "ui/aura/client/capture_client.h"
34 #include "ui/aura/client/focus_client.h" 33 #include "ui/aura/client/focus_client.h"
35 #include "ui/aura/client/screen_position_client.h" 34 #include "ui/aura/client/screen_position_client.h"
36 #include "ui/aura/window.h" 35 #include "ui/aura/window.h"
37 #include "ui/aura/window_event_dispatcher.h" 36 #include "ui/aura/window_event_dispatcher.h"
38 #include "ui/aura/window_property.h" 37 #include "ui/aura/window_property.h"
39 #include "ui/aura/window_tracker.h" 38 #include "ui/aura/window_tracker.h"
40 #include "ui/aura/window_tree_host.h" 39 #include "ui/aura/window_tree_host.h"
41 #include "ui/base/ime/input_method_factory.h" 40 #include "ui/base/ime/input_method_factory.h"
42 #include "ui/base/l10n/l10n_util.h" 41 #include "ui/base/l10n/l10n_util.h"
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 ui::ClearX11DefaultRootWindow(); 829 ui::ClearX11DefaultRootWindow();
831 #endif 830 #endif
832 } 831 }
833 832
834 #if defined(OS_CHROMEOS) 833 #if defined(OS_CHROMEOS)
835 ui::DisplayConfigurator* WindowTreeHostManager::display_configurator() { 834 ui::DisplayConfigurator* WindowTreeHostManager::display_configurator() {
836 return Shell::GetInstance()->display_configurator(); 835 return Shell::GetInstance()->display_configurator();
837 } 836 }
838 #endif 837 #endif
839 838
840 std::string WindowTreeHostManager::GetInternalDisplayNameString() {
841 return l10n_util::GetStringUTF8(IDS_ASH_INTERNAL_DISPLAY_NAME);
842 }
843
844 std::string WindowTreeHostManager::GetUnknownDisplayNameString() {
845 return l10n_util::GetStringUTF8(IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME);
846 }
847
848 ui::EventDispatchDetails WindowTreeHostManager::DispatchKeyEventPostIME( 839 ui::EventDispatchDetails WindowTreeHostManager::DispatchKeyEventPostIME(
849 ui::KeyEvent* event) { 840 ui::KeyEvent* event) {
850 // Getting the active root window to dispatch the event. This isn't 841 // Getting the active root window to dispatch the event. This isn't
851 // significant as the event will be sent to the window resolved by 842 // significant as the event will be sent to the window resolved by
852 // aura::client::FocusClient which is FocusController in ash. 843 // aura::client::FocusClient which is FocusController in ash.
853 aura::Window* active_window = wm::GetActiveWindow(); 844 aura::Window* active_window = wm::GetActiveWindow();
854 aura::Window* root_window = active_window ? active_window->GetRootWindow() 845 aura::Window* root_window = active_window ? active_window->GetRootWindow()
855 : Shell::GetPrimaryRootWindow(); 846 : Shell::GetPrimaryRootWindow();
856 return root_window->GetHost()->DispatchKeyEventPostIME(event); 847 return root_window->GetHost()->DispatchKeyEventPostIME(event);
857 } 848 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
895 SetDisplayPropertiesOnHost(ash_host, display); 886 SetDisplayPropertiesOnHost(ash_host, display);
896 887
897 #if defined(OS_CHROMEOS) 888 #if defined(OS_CHROMEOS)
898 if (switches::ConstrainPointerToRoot()) 889 if (switches::ConstrainPointerToRoot())
899 ash_host->ConfineCursorToRootWindow(); 890 ash_host->ConfineCursorToRootWindow();
900 #endif 891 #endif
901 return ash_host; 892 return ash_host;
902 } 893 }
903 894
904 } // namespace ash 895 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698