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

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: Fix preferences. 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 #include "ui/compositor/layer.h" 85 #include "ui/compositor/layer.h"
85 #include "ui/compositor/layer_animator.h" 86 #include "ui/compositor/layer_animator.h"
86 #include "ui/gfx/display.h" 87 #include "ui/gfx/display.h"
87 #include "ui/gfx/image/image_skia.h" 88 #include "ui/gfx/image/image_skia.h"
88 #include "ui/gfx/screen.h" 89 #include "ui/gfx/screen.h"
89 #include "ui/gfx/size.h" 90 #include "ui/gfx/size.h"
90 #include "ui/ui_controls/ui_controls.h" 91 #include "ui/ui_controls/ui_controls.h"
91 #include "ui/views/focus/focus_manager_factory.h" 92 #include "ui/views/focus/focus_manager_factory.h"
92 #include "ui/views/widget/native_widget_aura.h" 93 #include "ui/views/widget/native_widget_aura.h"
93 #include "ui/views/widget/widget.h" 94 #include "ui/views/widget/widget.h"
95 #include "ui/views/widget/widget_delegate.h"
94 96
95 #if !defined(OS_MACOSX) 97 #if !defined(OS_MACOSX)
96 #include "ash/accelerators/accelerator_controller.h" 98 #include "ash/accelerators/accelerator_controller.h"
97 #include "ash/accelerators/accelerator_filter.h" 99 #include "ash/accelerators/accelerator_filter.h"
98 #include "ash/accelerators/nested_dispatcher_controller.h" 100 #include "ash/accelerators/nested_dispatcher_controller.h"
99 #endif 101 #endif
100 102
101 #if defined(OS_CHROMEOS) 103 #if defined(OS_CHROMEOS)
102 #include "ash/display/output_configurator_animation.h" 104 #include "ash/display/output_configurator_animation.h"
103 #include "base/message_pump_aurax11.h" 105 #include "base/message_pump_aurax11.h"
(...skipping 136 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 visibility_controller_.reset(new internal::VisibilityController); 430 visibility_controller_.reset(new internal::VisibilityController);
428 drag_drop_controller_.reset(new internal::DragDropController); 431 drag_drop_controller_.reset(new internal::DragDropController);
429 if (delegate_.get()) 432 if (delegate_.get())
430 user_action_client_.reset(delegate_->CreateUserActionClient()); 433 user_action_client_.reset(delegate_->CreateUserActionClient());
431 window_modality_controller_.reset(new internal::WindowModalityController); 434 window_modality_controller_.reset(new internal::WindowModalityController);
432 AddEnvEventFilter(window_modality_controller_.get()); 435 AddEnvEventFilter(window_modality_controller_.get());
433 436
434 magnification_controller_.reset( 437 magnification_controller_.reset(
435 internal::MagnificationController::CreateInstance()); 438 internal::MagnificationController::CreateInstance());
436 439
440 partial_magnification_controller_.reset(
441 internal::PartialMagnificationController::CreateInstance());
442
437 high_contrast_controller_.reset(new HighContrastController); 443 high_contrast_controller_.reset(new HighContrastController);
438 video_detector_.reset(new VideoDetector); 444 video_detector_.reset(new VideoDetector);
439 window_cycle_controller_.reset( 445 window_cycle_controller_.reset(
440 new WindowCycleController(activation_controller_.get())); 446 new WindowCycleController(activation_controller_.get()));
441 447
442 tooltip_controller_.reset(new internal::TooltipController( 448 tooltip_controller_.reset(new internal::TooltipController(
443 drag_drop_controller_.get())); 449 drag_drop_controller_.get()));
444 AddEnvEventFilter(tooltip_controller_.get()); 450 AddEnvEventFilter(tooltip_controller_.get());
445 451
446 InitRootWindowController(root_window_controller); 452 InitRootWindowController(root_window_controller);
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 } 775 }
770 776
771 void Shell::ShowCursor(bool visible) { 777 void Shell::ShowCursor(bool visible) {
772 RootWindowList root_windows = GetAllRootWindows(); 778 RootWindowList root_windows = GetAllRootWindows();
773 for (RootWindowList::iterator iter = root_windows.begin(); 779 for (RootWindowList::iterator iter = root_windows.begin();
774 iter != root_windows.end(); ++iter) 780 iter != root_windows.end(); ++iter)
775 (*iter)->ShowCursor(visible); 781 (*iter)->ShowCursor(visible);
776 } 782 }
777 783
778 } // namespace ash 784 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698