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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 12254040: Revert 182494 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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
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 "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/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 const gfx::Rect& bounds = display->bounds(); 152 const gfx::Rect& bounds = display->bounds();
153 base::DictionaryValue* js_display = new base::DictionaryValue(); 153 base::DictionaryValue* js_display = new base::DictionaryValue();
154 js_display->SetString("id", base::Int64ToString(display->id())); 154 js_display->SetString("id", base::Int64ToString(display->id()));
155 js_display->SetDouble("x", bounds.x()); 155 js_display->SetDouble("x", bounds.x());
156 js_display->SetDouble("y", bounds.y()); 156 js_display->SetDouble("y", bounds.y());
157 js_display->SetDouble("width", bounds.width()); 157 js_display->SetDouble("width", bounds.width());
158 js_display->SetDouble("height", bounds.height()); 158 js_display->SetDouble("height", bounds.height());
159 js_display->SetString("name", 159 js_display->SetString("name",
160 display_manager->GetDisplayNameFor(*display)); 160 display_manager->GetDisplayNameFor(*display));
161 js_display->SetBoolean("isPrimary", display->id() == primary_id); 161 js_display->SetBoolean("isPrimary", display->id() == primary_id);
162 js_display->SetBoolean("isInternal", display->IsInternal()); 162 js_display->SetBoolean("isInternal",
163 display_manager->IsInternalDisplayId(display->id()));
163 display_info.Set(i, js_display); 164 display_info.Set(i, js_display);
164 } 165 }
165 166
166 scoped_ptr<base::Value> layout_value(base::Value::CreateNullValue()); 167 scoped_ptr<base::Value> layout_value(base::Value::CreateNullValue());
167 scoped_ptr<base::Value> offset_value(base::Value::CreateNullValue()); 168 scoped_ptr<base::Value> offset_value(base::Value::CreateNullValue());
168 if (display_manager->GetNumDisplays() > 1) { 169 if (display_manager->GetNumDisplays() > 1) {
169 const gfx::Display secondary_display = 170 const gfx::Display secondary_display =
170 ash::ScreenAsh::GetSecondaryDisplay(); 171 ash::ScreenAsh::GetSecondaryDisplay();
171 const ash::DisplayLayout& layout = 172 const ash::DisplayLayout& layout =
172 display_controller->GetLayoutForDisplay(secondary_display); 173 display_controller->GetLayoutForDisplay(secondary_display);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 ash::Shell::GetInstance()->output_configurator_animation()-> 250 ash::Shell::GetInstance()->output_configurator_animation()->
250 StartFadeOutAnimation(base::Bind( 251 StartFadeOutAnimation(base::Bind(
251 &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished, 252 &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished,
252 base::Unretained(this), 253 base::Unretained(this),
253 static_cast<int>(layout), 254 static_cast<int>(layout),
254 static_cast<int>(offset))); 255 static_cast<int>(offset)));
255 } 256 }
256 257
257 } // namespace options 258 } // namespace options
258 } // namespace chromeos 259 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/system_info_display/display_info_provider_chromeos.cc ('k') | ui/gfx/display.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698