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

Side by Side Diff: ash/shell.cc

Issue 1028563003: Load and apply a vcgt table from an ICC file to the internal display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ash::DisplayColorManager Created 5 years, 8 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/accelerator_controller.h" 10 #include "ash/accelerators/accelerator_controller.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 #if defined(OS_CHROMEOS) 117 #if defined(OS_CHROMEOS)
118 #if defined(USE_X11) 118 #if defined(USE_X11)
119 #include "ui/gfx/x/x11_types.h" 119 #include "ui/gfx/x/x11_types.h"
120 #endif // defined(USE_X11) 120 #endif // defined(USE_X11)
121 #include "ash/accelerators/magnifier_key_scroller.h" 121 #include "ash/accelerators/magnifier_key_scroller.h"
122 #include "ash/accelerators/spoken_feedback_toggler.h" 122 #include "ash/accelerators/spoken_feedback_toggler.h"
123 #include "ash/ash_constants.h" 123 #include "ash/ash_constants.h"
124 #include "ash/content/display/screen_orientation_controller_chromeos.h" 124 #include "ash/content/display/screen_orientation_controller_chromeos.h"
125 #include "ash/display/display_change_observer_chromeos.h" 125 #include "ash/display/display_change_observer_chromeos.h"
126 #include "ash/display/display_color_manager_chromeos.h"
126 #include "ash/display/display_configurator_animation.h" 127 #include "ash/display/display_configurator_animation.h"
127 #include "ash/display/display_error_observer_chromeos.h" 128 #include "ash/display/display_error_observer_chromeos.h"
128 #include "ash/display/projecting_observer_chromeos.h" 129 #include "ash/display/projecting_observer_chromeos.h"
129 #include "ash/display/resolution_notification_controller.h" 130 #include "ash/display/resolution_notification_controller.h"
130 #include "ash/sticky_keys/sticky_keys_controller.h" 131 #include "ash/sticky_keys/sticky_keys_controller.h"
131 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h" 132 #include "ash/system/chromeos/bluetooth/bluetooth_notification_controller.h"
132 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h" 133 #include "ash/system/chromeos/brightness/brightness_controller_chromeos.h"
133 #include "ash/system/chromeos/power/power_event_observer.h" 134 #include "ash/system/chromeos/power/power_event_observer.h"
134 #include "ash/system/chromeos/power/power_status.h" 135 #include "ash/system/chromeos/power/power_status.h"
135 #include "ash/system/chromeos/power/video_activity_notifier.h" 136 #include "ash/system/chromeos/power/video_activity_notifier.h"
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 display_controller_->Shutdown(); 804 display_controller_->Shutdown();
804 display_controller_.reset(); 805 display_controller_.reset();
805 screen_position_controller_.reset(); 806 screen_position_controller_.reset();
806 accessibility_delegate_.reset(); 807 accessibility_delegate_.reset();
807 new_window_delegate_.reset(); 808 new_window_delegate_.reset();
808 media_delegate_.reset(); 809 media_delegate_.reset();
809 810
810 keyboard::KeyboardController::ResetInstance(NULL); 811 keyboard::KeyboardController::ResetInstance(NULL);
811 812
812 #if defined(OS_CHROMEOS) 813 #if defined(OS_CHROMEOS)
814 display_color_manager_ = nullptr;
813 if (display_change_observer_) 815 if (display_change_observer_)
814 display_configurator_->RemoveObserver(display_change_observer_.get()); 816 display_configurator_->RemoveObserver(display_change_observer_.get());
815 if (display_configurator_animation_) 817 if (display_configurator_animation_)
816 display_configurator_->RemoveObserver( 818 display_configurator_->RemoveObserver(
817 display_configurator_animation_.get()); 819 display_configurator_animation_.get());
818 if (display_error_observer_) 820 if (display_error_observer_)
819 display_configurator_->RemoveObserver(display_error_observer_.get()); 821 display_configurator_->RemoveObserver(display_error_observer_.get());
820 if (projecting_observer_) 822 if (projecting_observer_)
821 display_configurator_->RemoveObserver(projecting_observer_.get()); 823 display_configurator_->RemoveObserver(projecting_observer_.get());
822 display_change_observer_.reset(); 824 display_change_observer_.reset();
(...skipping 29 matching lines...) Expand all
852 // observer gets invoked after the root windows are configured. 854 // observer gets invoked after the root windows are configured.
853 display_configurator_->AddObserver(display_change_observer_.get()); 855 display_configurator_->AddObserver(display_change_observer_.get());
854 display_error_observer_.reset(new DisplayErrorObserver()); 856 display_error_observer_.reset(new DisplayErrorObserver());
855 display_configurator_->AddObserver(display_error_observer_.get()); 857 display_configurator_->AddObserver(display_error_observer_.get());
856 display_configurator_->set_state_controller(display_change_observer_.get()); 858 display_configurator_->set_state_controller(display_change_observer_.get());
857 display_configurator_->set_mirroring_controller(display_manager_.get()); 859 display_configurator_->set_mirroring_controller(display_manager_.get());
858 display_configurator_->ForceInitialConfigure( 860 display_configurator_->ForceInitialConfigure(
859 delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0); 861 delegate_->IsFirstRunAfterBoot() ? kChromeOsBootColor : 0);
860 display_initialized = true; 862 display_initialized = true;
861 } 863 }
864 display_color_manager_ = new DisplayColorManager(display_configurator_.get());
862 #endif // defined(OS_CHROMEOS) 865 #endif // defined(OS_CHROMEOS)
863 if (!display_initialized) 866 if (!display_initialized)
864 display_manager_->InitDefaultDisplay(); 867 display_manager_->InitDefaultDisplay();
865 868
866 display_manager_->RefreshFontParams(); 869 display_manager_->RefreshFontParams();
867 870
868 // Install the custom factory first so that views::FocusManagers for Tray, 871 // Install the custom factory first so that views::FocusManagers for Tray,
869 // Shelf, and WallPaper could be created by the factory. 872 // Shelf, and WallPaper could be created by the factory.
870 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 873 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
871 874
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1170 //////////////////////////////////////////////////////////////////////////////// 1173 ////////////////////////////////////////////////////////////////////////////////
1171 // Shell, aura::client::ActivationChangeObserver implementation: 1174 // Shell, aura::client::ActivationChangeObserver implementation:
1172 1175
1173 void Shell::OnWindowActivated(aura::Window* gained_active, 1176 void Shell::OnWindowActivated(aura::Window* gained_active,
1174 aura::Window* lost_active) { 1177 aura::Window* lost_active) {
1175 if (gained_active) 1178 if (gained_active)
1176 target_root_window_ = gained_active->GetRootWindow(); 1179 target_root_window_ = gained_active->GetRootWindow();
1177 } 1180 }
1178 1181
1179 } // namespace ash 1182 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698