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

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

Issue 2523873002: Remove DisplayChangeObserver ash dependencies. (Closed)
Patch Set: Change DCO constructor slightly. 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
« no previous file with comments | « ash/display/window_tree_host_manager.h ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 ui::ClearX11DefaultRootWindow(); 832 ui::ClearX11DefaultRootWindow();
834 #endif 833 #endif
835 } 834 }
836 835
837 #if defined(OS_CHROMEOS) 836 #if defined(OS_CHROMEOS)
838 ui::DisplayConfigurator* WindowTreeHostManager::display_configurator() { 837 ui::DisplayConfigurator* WindowTreeHostManager::display_configurator() {
839 return Shell::GetInstance()->display_configurator(); 838 return Shell::GetInstance()->display_configurator();
840 } 839 }
841 #endif 840 #endif
842 841
843 std::string WindowTreeHostManager::GetInternalDisplayNameString() {
844 return l10n_util::GetStringUTF8(IDS_ASH_INTERNAL_DISPLAY_NAME);
845 }
846
847 std::string WindowTreeHostManager::GetUnknownDisplayNameString() {
848 return l10n_util::GetStringUTF8(IDS_ASH_STATUS_TRAY_UNKNOWN_DISPLAY_NAME);
849 }
850
851 ui::EventDispatchDetails WindowTreeHostManager::DispatchKeyEventPostIME( 842 ui::EventDispatchDetails WindowTreeHostManager::DispatchKeyEventPostIME(
852 ui::KeyEvent* event) { 843 ui::KeyEvent* event) {
853 // Getting the active root window to dispatch the event. This isn't 844 // Getting the active root window to dispatch the event. This isn't
854 // significant as the event will be sent to the window resolved by 845 // significant as the event will be sent to the window resolved by
855 // aura::client::FocusClient which is FocusController in ash. 846 // aura::client::FocusClient which is FocusController in ash.
856 aura::Window* active_window = wm::GetActiveWindow(); 847 aura::Window* active_window = wm::GetActiveWindow();
857 aura::Window* root_window = active_window ? active_window->GetRootWindow() 848 aura::Window* root_window = active_window ? active_window->GetRootWindow()
858 : Shell::GetPrimaryRootWindow(); 849 : Shell::GetPrimaryRootWindow();
859 return root_window->GetHost()->DispatchKeyEventPostIME(event); 850 return root_window->GetHost()->DispatchKeyEventPostIME(event);
860 } 851 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 SetDisplayPropertiesOnHost(ash_host, display); 889 SetDisplayPropertiesOnHost(ash_host, display);
899 890
900 #if defined(OS_CHROMEOS) 891 #if defined(OS_CHROMEOS)
901 if (switches::ConstrainPointerToRoot()) 892 if (switches::ConstrainPointerToRoot())
902 ash_host->ConfineCursorToRootWindow(); 893 ash_host->ConfineCursorToRootWindow();
903 #endif 894 #endif
904 return ash_host; 895 return ash_host;
905 } 896 }
906 897
907 } // namespace ash 898 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698