OLD | NEW |
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 "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/display/display_controller.h" | 9 #include "ash/display/display_controller.h" |
10 #include "ash/display/output_configurator_animation.h" | 10 #include "ash/display/output_configurator_animation.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 void DisplayOptionsHandler::SendDisplayInfo() { | 110 void DisplayOptionsHandler::SendDisplayInfo() { |
111 aura::DisplayManager* display_manager = | 111 aura::DisplayManager* display_manager = |
112 aura::Env::GetInstance()->display_manager(); | 112 aura::Env::GetInstance()->display_manager(); |
113 ash::DisplayController* display_controller = | 113 ash::DisplayController* display_controller = |
114 ash::Shell::GetInstance()->display_controller(); | 114 ash::Shell::GetInstance()->display_controller(); |
115 chromeos::OutputConfigurator* output_configurator = | 115 chromeos::OutputConfigurator* output_configurator = |
116 ash::Shell::GetInstance()->output_configurator(); | 116 ash::Shell::GetInstance()->output_configurator(); |
117 base::FundamentalValue mirroring( | 117 base::FundamentalValue mirroring( |
118 output_configurator->output_state() == chromeos::STATE_DUAL_MIRROR); | 118 output_configurator->output_state() == chromeos::STATE_DUAL_MIRROR); |
119 | 119 |
120 int64 primary_id = gfx::Screen::GetPrimaryDisplay().id(); | 120 int64 primary_id = ash::Shell::GetAshScreen()->GetPrimaryDisplay().id(); |
121 base::ListValue displays; | 121 base::ListValue displays; |
122 for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) { | 122 for (size_t i = 0; i < display_manager->GetNumDisplays(); ++i) { |
123 const gfx::Display* display = display_manager->GetDisplayAt(i); | 123 const gfx::Display* display = display_manager->GetDisplayAt(i); |
124 const gfx::Rect& bounds = display->bounds(); | 124 const gfx::Rect& bounds = display->bounds(); |
125 base::DictionaryValue* js_display = new base::DictionaryValue(); | 125 base::DictionaryValue* js_display = new base::DictionaryValue(); |
126 js_display->SetString("id", base::Int64ToString(display->id())); | 126 js_display->SetString("id", base::Int64ToString(display->id())); |
127 js_display->SetDouble("x", bounds.x()); | 127 js_display->SetDouble("x", bounds.x()); |
128 js_display->SetDouble("y", bounds.y()); | 128 js_display->SetDouble("y", bounds.y()); |
129 js_display->SetDouble("width", bounds.width()); | 129 js_display->SetDouble("width", bounds.width()); |
130 js_display->SetDouble("height", bounds.height()); | 130 js_display->SetDouble("height", bounds.height()); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 ash::Shell::GetInstance()->output_configurator_animation()-> | 227 ash::Shell::GetInstance()->output_configurator_animation()-> |
228 StartFadeOutAnimation(base::Bind( | 228 StartFadeOutAnimation(base::Bind( |
229 &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished, | 229 &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished, |
230 base::Unretained(this), | 230 base::Unretained(this), |
231 static_cast<int>(layout), | 231 static_cast<int>(layout), |
232 static_cast<int>(offset))); | 232 static_cast<int>(offset))); |
233 } | 233 } |
234 | 234 |
235 } // namespace options | 235 } // namespace options |
236 } // namespace chromeos | 236 } // namespace chromeos |
OLD | NEW |