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

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: Remove pure virtual interface Created 8 years, 2 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_delegate.h" 29 #include "ash/shell_delegate.h"
29 #include "ash/shell_factory.h" 30 #include "ash/shell_factory.h"
30 #include "ash/shell_window_ids.h" 31 #include "ash/shell_window_ids.h"
31 #include "ash/system/status_area_widget.h" 32 #include "ash/system/status_area_widget.h"
32 #include "ash/tooltips/tooltip_controller.h" 33 #include "ash/tooltips/tooltip_controller.h"
33 #include "ash/touch/touch_observer_hud.h" 34 #include "ash/touch/touch_observer_hud.h"
34 #include "ash/wm/activation_controller.h" 35 #include "ash/wm/activation_controller.h"
35 #include "ash/wm/always_on_top_controller.h" 36 #include "ash/wm/always_on_top_controller.h"
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 app_list_controller_.reset(); 240 app_list_controller_.reset();
240 241
241 // Destroy all child windows including widgets. 242 // Destroy all child windows including widgets.
242 display_controller_->CloseChildWindows(); 243 display_controller_->CloseChildWindows();
243 244
244 // These need a valid Shell instance to clean up properly, so explicitly 245 // These need a valid Shell instance to clean up properly, so explicitly
245 // delete them before invalidating the instance. 246 // delete them before invalidating the instance.
246 // Alphabetical. 247 // Alphabetical.
247 drag_drop_controller_.reset(); 248 drag_drop_controller_.reset();
248 magnification_controller_.reset(); 249 magnification_controller_.reset();
250 partial_magnification_controller_.reset();
249 power_button_controller_.reset(); 251 power_button_controller_.reset();
250 resize_shadow_controller_.reset(); 252 resize_shadow_controller_.reset();
251 shadow_controller_.reset(); 253 shadow_controller_.reset();
252 tooltip_controller_.reset(); 254 tooltip_controller_.reset();
253 event_client_.reset(); 255 event_client_.reset();
254 window_cycle_controller_.reset(); 256 window_cycle_controller_.reset();
255 capture_controller_.reset(); 257 capture_controller_.reset();
256 nested_dispatcher_controller_.reset(); 258 nested_dispatcher_controller_.reset();
257 user_action_client_.reset(); 259 user_action_client_.reset();
258 visibility_controller_.reset(); 260 visibility_controller_.reset();
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 visibility_controller_.reset(new internal::VisibilityController); 438 visibility_controller_.reset(new internal::VisibilityController);
437 drag_drop_controller_.reset(new internal::DragDropController); 439 drag_drop_controller_.reset(new internal::DragDropController);
438 if (delegate_.get()) 440 if (delegate_.get())
439 user_action_client_.reset(delegate_->CreateUserActionClient()); 441 user_action_client_.reset(delegate_->CreateUserActionClient());
440 window_modality_controller_.reset(new internal::WindowModalityController); 442 window_modality_controller_.reset(new internal::WindowModalityController);
441 AddEnvEventFilter(window_modality_controller_.get()); 443 AddEnvEventFilter(window_modality_controller_.get());
442 444
443 magnification_controller_.reset( 445 magnification_controller_.reset(
444 internal::MagnificationController::CreateInstance()); 446 internal::MagnificationController::CreateInstance());
445 447
448 partial_magnification_controller_.reset(
449 new internal::PartialMagnificationController());
450
446 high_contrast_controller_.reset(new HighContrastController); 451 high_contrast_controller_.reset(new HighContrastController);
447 video_detector_.reset(new VideoDetector); 452 video_detector_.reset(new VideoDetector);
448 window_cycle_controller_.reset( 453 window_cycle_controller_.reset(
449 new WindowCycleController(activation_controller_.get())); 454 new WindowCycleController(activation_controller_.get()));
450 455
451 tooltip_controller_.reset(new internal::TooltipController( 456 tooltip_controller_.reset(new internal::TooltipController(
452 drag_drop_controller_.get())); 457 drag_drop_controller_.get()));
453 AddEnvEventFilter(tooltip_controller_.get()); 458 AddEnvEventFilter(tooltip_controller_.get());
454 459
455 event_client_.reset(new internal::EventClientImpl); 460 event_client_.reset(new internal::EventClientImpl);
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 iter != controllers.end(); ++iter) { 763 iter != controllers.end(); ++iter) {
759 if ((*iter)->GetSystemModalLayoutManager(window)-> 764 if ((*iter)->GetSystemModalLayoutManager(window)->
760 CanWindowReceiveEvents(window)) { 765 CanWindowReceiveEvents(window)) {
761 return true; 766 return true;
762 } 767 }
763 } 768 }
764 return false; 769 return false;
765 } 770 }
766 771
767 } // namespace ash 772 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698