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

Side by Side Diff: ash/shell.cc

Issue 10915140: Add the partial screen magnifier to Chrome OS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Code review fixes Created 8 years, 3 months 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/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
11 #include "ash/ash_switches.h" 11 #include "ash/ash_switches.h"
12 #include "ash/caps_lock_delegate_stub.h" 12 #include "ash/caps_lock_delegate_stub.h"
13 #include "ash/desktop_background/desktop_background_controller.h" 13 #include "ash/desktop_background/desktop_background_controller.h"
14 #include "ash/desktop_background/desktop_background_resources.h" 14 #include "ash/desktop_background/desktop_background_resources.h"
15 #include "ash/desktop_background/desktop_background_view.h" 15 #include "ash/desktop_background/desktop_background_view.h"
16 #include "ash/display/display_controller.h" 16 #include "ash/display/display_controller.h"
17 #include "ash/display/mouse_cursor_event_filter.h" 17 #include "ash/display/mouse_cursor_event_filter.h"
18 #include "ash/display/multi_display_manager.h" 18 #include "ash/display/multi_display_manager.h"
19 #include "ash/display/screen_position_controller.h" 19 #include "ash/display/screen_position_controller.h"
20 #include "ash/display/secondary_display_view.h" 20 #include "ash/display/secondary_display_view.h"
21 #include "ash/drag_drop/drag_drop_controller.h" 21 #include "ash/drag_drop/drag_drop_controller.h"
22 #include "ash/focus_cycler.h" 22 #include "ash/focus_cycler.h"
23 #include "ash/high_contrast/high_contrast_controller.h" 23 #include "ash/high_contrast/high_contrast_controller.h"
24 #include "ash/launcher/launcher.h" 24 #include "ash/launcher/launcher.h"
25 #include "ash/magnifier/magnification_controller.h" 25 #include "ash/magnifier/magnification_controller.h"
26 #include "ash/magnifier/partial_magnification_controller.h"
26 #include "ash/root_window_controller.h" 27 #include "ash/root_window_controller.h"
27 #include "ash/screen_ash.h" 28 #include "ash/screen_ash.h"
28 #include "ash/shell_context_menu.h" 29 #include "ash/shell_context_menu.h"
29 #include "ash/shell_delegate.h" 30 #include "ash/shell_delegate.h"
30 #include "ash/shell_factory.h" 31 #include "ash/shell_factory.h"
31 #include "ash/shell_window_ids.h" 32 #include "ash/shell_window_ids.h"
32 #include "ash/system/status_area_widget.h" 33 #include "ash/system/status_area_widget.h"
33 #include "ash/system/tray/system_tray.h" 34 #include "ash/system/tray/system_tray.h"
34 #include "ash/tooltips/tooltip_controller.h" 35 #include "ash/tooltips/tooltip_controller.h"
35 #include "ash/touch/touch_observer_hud.h" 36 #include "ash/touch/touch_observer_hud.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "ui/compositor/layer.h" 83 #include "ui/compositor/layer.h"
83 #include "ui/compositor/layer_animator.h" 84 #include "ui/compositor/layer_animator.h"
84 #include "ui/gfx/display.h" 85 #include "ui/gfx/display.h"
85 #include "ui/gfx/image/image_skia.h" 86 #include "ui/gfx/image/image_skia.h"
86 #include "ui/gfx/screen.h" 87 #include "ui/gfx/screen.h"
87 #include "ui/gfx/size.h" 88 #include "ui/gfx/size.h"
88 #include "ui/ui_controls/ui_controls.h" 89 #include "ui/ui_controls/ui_controls.h"
89 #include "ui/views/focus/focus_manager_factory.h" 90 #include "ui/views/focus/focus_manager_factory.h"
90 #include "ui/views/widget/native_widget_aura.h" 91 #include "ui/views/widget/native_widget_aura.h"
91 #include "ui/views/widget/widget.h" 92 #include "ui/views/widget/widget.h"
93 #include "ui/views/widget/widget_delegate.h"
92 94
93 #if !defined(OS_MACOSX) 95 #if !defined(OS_MACOSX)
94 #include "ash/accelerators/accelerator_controller.h" 96 #include "ash/accelerators/accelerator_controller.h"
95 #include "ash/accelerators/accelerator_filter.h" 97 #include "ash/accelerators/accelerator_filter.h"
96 #include "ash/accelerators/nested_dispatcher_controller.h" 98 #include "ash/accelerators/nested_dispatcher_controller.h"
97 #endif 99 #endif
98 100
99 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
100 #include "ash/display/output_configurator_animation.h" 102 #include "ash/display/output_configurator_animation.h"
101 #include "base/message_pump_aurax11.h" 103 #include "base/message_pump_aurax11.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 app_list_controller_.reset(); 242 app_list_controller_.reset();
241 243
242 // Destroy all child windows including widgets. 244 // Destroy all child windows including widgets.
243 display_controller_->CloseChildWindows(); 245 display_controller_->CloseChildWindows();
244 246
245 // These need a valid Shell instance to clean up properly, so explicitly 247 // These need a valid Shell instance to clean up properly, so explicitly
246 // delete them before invalidating the instance. 248 // delete them before invalidating the instance.
247 // Alphabetical. 249 // Alphabetical.
248 drag_drop_controller_.reset(); 250 drag_drop_controller_.reset();
249 magnification_controller_.reset(); 251 magnification_controller_.reset();
252 partial_magnification_controller_.reset();
250 power_button_controller_.reset(); 253 power_button_controller_.reset();
251 resize_shadow_controller_.reset(); 254 resize_shadow_controller_.reset();
252 shadow_controller_.reset(); 255 shadow_controller_.reset();
253 tooltip_controller_.reset(); 256 tooltip_controller_.reset();
254 window_cycle_controller_.reset(); 257 window_cycle_controller_.reset();
255 capture_controller_.reset(); 258 capture_controller_.reset();
256 nested_dispatcher_controller_.reset(); 259 nested_dispatcher_controller_.reset();
257 user_action_client_.reset(); 260 user_action_client_.reset();
258 visibility_controller_.reset(); 261 visibility_controller_.reset();
259 262
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 visibility_controller_.reset(new internal::VisibilityController); 433 visibility_controller_.reset(new internal::VisibilityController);
431 drag_drop_controller_.reset(new internal::DragDropController); 434 drag_drop_controller_.reset(new internal::DragDropController);
432 if (delegate_.get()) 435 if (delegate_.get())
433 user_action_client_.reset(delegate_->CreateUserActionClient()); 436 user_action_client_.reset(delegate_->CreateUserActionClient());
434 window_modality_controller_.reset(new internal::WindowModalityController); 437 window_modality_controller_.reset(new internal::WindowModalityController);
435 AddEnvEventFilter(window_modality_controller_.get()); 438 AddEnvEventFilter(window_modality_controller_.get());
436 439
437 magnification_controller_.reset( 440 magnification_controller_.reset(
438 internal::MagnificationController::CreateInstance()); 441 internal::MagnificationController::CreateInstance());
439 442
443 partial_magnification_controller_.reset(
444 internal::PartialMagnificationController::CreateInstance());
445
440 high_contrast_controller_.reset(new HighContrastController); 446 high_contrast_controller_.reset(new HighContrastController);
441 video_detector_.reset(new VideoDetector); 447 video_detector_.reset(new VideoDetector);
442 window_cycle_controller_.reset( 448 window_cycle_controller_.reset(
443 new WindowCycleController(activation_controller_.get())); 449 new WindowCycleController(activation_controller_.get()));
444 450
445 tooltip_controller_.reset(new internal::TooltipController( 451 tooltip_controller_.reset(new internal::TooltipController(
446 drag_drop_controller_.get())); 452 drag_drop_controller_.get()));
447 AddEnvEventFilter(tooltip_controller_.get()); 453 AddEnvEventFilter(tooltip_controller_.get());
448 454
449 InitRootWindowController(root_window_controller); 455 InitRootWindowController(root_window_controller);
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 } 765 }
760 766
761 void Shell::ShowCursor(bool visible) { 767 void Shell::ShowCursor(bool visible) {
762 RootWindowList root_windows = GetAllRootWindows(); 768 RootWindowList root_windows = GetAllRootWindows();
763 for (RootWindowList::iterator iter = root_windows.begin(); 769 for (RootWindowList::iterator iter = root_windows.begin();
764 iter != root_windows.end(); ++iter) 770 iter != root_windows.end(); ++iter)
765 (*iter)->ShowCursor(visible); 771 (*iter)->ShowCursor(visible);
766 } 772 }
767 773
768 } // namespace ash 774 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698