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

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, 1 month 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.h" 12 #include "ash/caps_lock_delegate.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/drag_drop/drag_drop_controller.h" 20 #include "ash/drag_drop/drag_drop_controller.h"
21 #include "ash/focus_cycler.h" 21 #include "ash/focus_cycler.h"
22 #include "ash/high_contrast/high_contrast_controller.h" 22 #include "ash/high_contrast/high_contrast_controller.h"
23 #include "ash/magnifier/magnification_controller.h" 23 #include "ash/magnifier/magnification_controller.h"
24 #include "ash/magnifier/partial_magnification_controller.h"
24 #include "ash/root_window_controller.h" 25 #include "ash/root_window_controller.h"
25 #include "ash/screen_ash.h" 26 #include "ash/screen_ash.h"
26 #include "ash/shell_delegate.h" 27 #include "ash/shell_delegate.h"
27 #include "ash/shell_factory.h" 28 #include "ash/shell_factory.h"
28 #include "ash/shell_window_ids.h" 29 #include "ash/shell_window_ids.h"
29 #include "ash/system/status_area_widget.h" 30 #include "ash/system/status_area_widget.h"
30 #include "ash/system/tray/system_tray_delegate.h" 31 #include "ash/system/tray/system_tray_delegate.h"
31 #include "ash/tooltips/tooltip_controller.h" 32 #include "ash/tooltips/tooltip_controller.h"
32 #include "ash/touch/touch_observer_hud.h" 33 #include "ash/touch/touch_observer_hud.h"
33 #include "ash/wm/activation_controller.h" 34 #include "ash/wm/activation_controller.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 system_tray_delegate_.reset(); 257 system_tray_delegate_.reset();
257 258
258 // Destroy all child windows including widgets. 259 // Destroy all child windows including widgets.
259 display_controller_->CloseChildWindows(); 260 display_controller_->CloseChildWindows();
260 261
261 // These need a valid Shell instance to clean up properly, so explicitly 262 // These need a valid Shell instance to clean up properly, so explicitly
262 // delete them before invalidating the instance. 263 // delete them before invalidating the instance.
263 // Alphabetical. 264 // Alphabetical.
264 drag_drop_controller_.reset(); 265 drag_drop_controller_.reset();
265 magnification_controller_.reset(); 266 magnification_controller_.reset();
267 partial_magnification_controller_.reset();
266 power_button_controller_.reset(); 268 power_button_controller_.reset();
267 session_state_controller_.reset(); 269 session_state_controller_.reset();
268 resize_shadow_controller_.reset(); 270 resize_shadow_controller_.reset();
269 shadow_controller_.reset(); 271 shadow_controller_.reset();
270 tooltip_controller_.reset(); 272 tooltip_controller_.reset();
271 event_client_.reset(); 273 event_client_.reset();
272 window_cycle_controller_.reset(); 274 window_cycle_controller_.reset();
273 capture_controller_.reset(); 275 capture_controller_.reset();
274 nested_dispatcher_controller_.reset(); 276 nested_dispatcher_controller_.reset();
275 user_action_client_.reset(); 277 user_action_client_.reset();
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 // TODO(oshima): Move as many controllers before creating 457 // TODO(oshima): Move as many controllers before creating
456 // RootWindowController as possible. 458 // RootWindowController as possible.
457 stacking_controller_.reset(new internal::StackingController); 459 stacking_controller_.reset(new internal::StackingController);
458 visibility_controller_.reset(new internal::VisibilityController); 460 visibility_controller_.reset(new internal::VisibilityController);
459 drag_drop_controller_.reset(new internal::DragDropController); 461 drag_drop_controller_.reset(new internal::DragDropController);
460 user_action_client_.reset(delegate_->CreateUserActionClient()); 462 user_action_client_.reset(delegate_->CreateUserActionClient());
461 window_modality_controller_.reset(new internal::WindowModalityController); 463 window_modality_controller_.reset(new internal::WindowModalityController);
462 AddEnvEventFilter(window_modality_controller_.get()); 464 AddEnvEventFilter(window_modality_controller_.get());
463 465
464 magnification_controller_.reset( 466 magnification_controller_.reset(
465 internal::MagnificationController::CreateInstance()); 467 MagnificationController::CreateInstance());
468
469 partial_magnification_controller_.reset(
470 new PartialMagnificationController());
466 471
467 high_contrast_controller_.reset(new HighContrastController); 472 high_contrast_controller_.reset(new HighContrastController);
468 video_detector_.reset(new VideoDetector); 473 video_detector_.reset(new VideoDetector);
469 window_cycle_controller_.reset( 474 window_cycle_controller_.reset(
470 new WindowCycleController(activation_controller_.get())); 475 new WindowCycleController(activation_controller_.get()));
471 476
472 tooltip_controller_.reset(new internal::TooltipController( 477 tooltip_controller_.reset(new internal::TooltipController(
473 drag_drop_controller_.get())); 478 drag_drop_controller_.get()));
474 AddEnvEventFilter(tooltip_controller_.get()); 479 AddEnvEventFilter(tooltip_controller_.get());
475 480
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 840
836 bool Shell::CanAcceptEvents() { 841 bool Shell::CanAcceptEvents() {
837 return true; 842 return true;
838 } 843 }
839 844
840 ui::EventTarget* Shell::GetParentTarget() { 845 ui::EventTarget* Shell::GetParentTarget() {
841 return NULL; 846 return NULL;
842 } 847 }
843 848
844 } // namespace ash 849 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698