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

Side by Side Diff: ash/shell.cc

Issue 22703004: Creates notifications for display resolution change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix on display_preferences_unittest Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/chromeos/display/display_preferences.cc » ('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/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_view.h" 14 #include "ash/desktop_background/desktop_background_view.h"
15 #include "ash/desktop_background/user_wallpaper_delegate.h" 15 #include "ash/desktop_background/user_wallpaper_delegate.h"
16 #include "ash/display/display_controller.h" 16 #include "ash/display/display_controller.h"
17 #include "ash/display/display_manager.h" 17 #include "ash/display/display_manager.h"
18 #include "ash/display/event_transformation_handler.h" 18 #include "ash/display/event_transformation_handler.h"
19 #include "ash/display/mouse_cursor_event_filter.h" 19 #include "ash/display/mouse_cursor_event_filter.h"
20 #include "ash/display/resolution_notification_controller.h"
20 #include "ash/display/screen_position_controller.h" 21 #include "ash/display/screen_position_controller.h"
21 #include "ash/drag_drop/drag_drop_controller.h" 22 #include "ash/drag_drop/drag_drop_controller.h"
22 #include "ash/focus_cycler.h" 23 #include "ash/focus_cycler.h"
23 #include "ash/high_contrast/high_contrast_controller.h" 24 #include "ash/high_contrast/high_contrast_controller.h"
24 #include "ash/host/root_window_host_factory.h" 25 #include "ash/host/root_window_host_factory.h"
25 #include "ash/launcher/launcher_delegate.h" 26 #include "ash/launcher/launcher_delegate.h"
26 #include "ash/launcher/launcher_model.h" 27 #include "ash/launcher/launcher_model.h"
27 #include "ash/magnifier/magnification_controller.h" 28 #include "ash/magnifier/magnification_controller.h"
28 #include "ash/magnifier/partial_magnification_controller.h" 29 #include "ash/magnifier/partial_magnification_controller.h"
29 #include "ash/root_window_controller.h" 30 #include "ash/root_window_controller.h"
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 user_action_client_.reset(); 306 user_action_client_.reset();
306 visibility_controller_.reset(); 307 visibility_controller_.reset();
307 launcher_delegate_.reset(); 308 launcher_delegate_.reset();
308 launcher_model_.reset(); 309 launcher_model_.reset();
309 video_detector_.reset(); 310 video_detector_.reset();
310 311
311 power_button_controller_.reset(); 312 power_button_controller_.reset();
312 lock_state_controller_.reset(); 313 lock_state_controller_.reset();
313 mru_window_tracker_.reset(); 314 mru_window_tracker_.reset();
314 315
316 resolution_notification_controller_.reset();
317
315 // This also deletes all RootWindows. Note that we invoke Shutdown() on 318 // This also deletes all RootWindows. Note that we invoke Shutdown() on
316 // DisplayController before resetting |display_controller_|, since destruction 319 // DisplayController before resetting |display_controller_|, since destruction
317 // of its owned RootWindowControllers relies on the value. 320 // of its owned RootWindowControllers relies on the value.
318 display_controller_->Shutdown(); 321 display_controller_->Shutdown();
319 display_controller_.reset(); 322 display_controller_.reset();
320 screen_position_controller_.reset(); 323 screen_position_controller_.reset();
321 324
322 // Delete the activation controller after other controllers and launcher 325 // Delete the activation controller after other controllers and launcher
323 // because they might have registered ActivationChangeObserver. 326 // because they might have registered ActivationChangeObserver.
324 activation_controller_.reset(); 327 activation_controller_.reset();
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 focus_cycler_.reset(new internal::FocusCycler()); 501 focus_cycler_.reset(new internal::FocusCycler());
499 502
500 screen_position_controller_.reset(new internal::ScreenPositionController); 503 screen_position_controller_.reset(new internal::ScreenPositionController);
501 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory()); 504 root_window_host_factory_.reset(delegate_->CreateRootWindowHostFactory());
502 505
503 display_controller_->Start(); 506 display_controller_->Start();
504 display_controller_->InitPrimaryDisplay(); 507 display_controller_->InitPrimaryDisplay();
505 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow(); 508 aura::RootWindow* root_window = display_controller_->GetPrimaryRootWindow();
506 target_root_window_ = root_window; 509 target_root_window_ = root_window;
507 510
511 resolution_notification_controller_.reset(
512 new internal::ResolutionNotificationController);
513
508 cursor_manager_.SetDisplay(DisplayController::GetPrimaryDisplay()); 514 cursor_manager_.SetDisplay(DisplayController::GetPrimaryDisplay());
509 515
510 #if !defined(OS_MACOSX) 516 #if !defined(OS_MACOSX)
511 nested_dispatcher_controller_.reset(new NestedDispatcherController); 517 nested_dispatcher_controller_.reset(new NestedDispatcherController);
512 accelerator_controller_.reset(new AcceleratorController); 518 accelerator_controller_.reset(new AcceleratorController);
513 #endif 519 #endif
514 520
515 // The order in which event filters are added is significant. 521 // The order in which event filters are added is significant.
516 event_rewriter_filter_.reset(new internal::EventRewriterEventFilter); 522 event_rewriter_filter_.reset(new internal::EventRewriterEventFilter);
517 AddPreTargetHandler(event_rewriter_filter_.get()); 523 AddPreTargetHandler(event_rewriter_filter_.get());
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 //////////////////////////////////////////////////////////////////////////////// 972 ////////////////////////////////////////////////////////////////////////////////
967 // Shell, aura::client::ActivationChangeObserver implementation: 973 // Shell, aura::client::ActivationChangeObserver implementation:
968 974
969 void Shell::OnWindowActivated(aura::Window* gained_active, 975 void Shell::OnWindowActivated(aura::Window* gained_active,
970 aura::Window* lost_active) { 976 aura::Window* lost_active) {
971 if (gained_active) 977 if (gained_active)
972 target_root_window_ = gained_active->GetRootWindow(); 978 target_root_window_ = gained_active->GetRootWindow();
973 } 979 }
974 980
975 } // namespace ash 981 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/chromeos/display/display_preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698