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

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

Issue 12217120: Add IsInternal property to gfx::Display (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Get rid of static initializer 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
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", 162 js_display->SetBoolean("isInternal", display->IsInternal());
163 display_manager->IsInternalDisplayId(display->id()));
164 display_info.Set(i, js_display); 163 display_info.Set(i, js_display);
165 } 164 }
166 165
167 scoped_ptr<base::Value> layout_value(base::Value::CreateNullValue()); 166 scoped_ptr<base::Value> layout_value(base::Value::CreateNullValue());
168 scoped_ptr<base::Value> offset_value(base::Value::CreateNullValue()); 167 scoped_ptr<base::Value> offset_value(base::Value::CreateNullValue());
169 if (display_manager->GetNumDisplays() > 1) { 168 if (display_manager->GetNumDisplays() > 1) {
170 const gfx::Display secondary_display = 169 const gfx::Display secondary_display =
171 ash::ScreenAsh::GetSecondaryDisplay(); 170 ash::ScreenAsh::GetSecondaryDisplay();
172 const ash::DisplayLayout& layout = 171 const ash::DisplayLayout& layout =
173 display_controller->GetLayoutForDisplay(secondary_display); 172 display_controller->GetLayoutForDisplay(secondary_display);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 ash::Shell::GetInstance()->output_configurator_animation()-> 249 ash::Shell::GetInstance()->output_configurator_animation()->
251 StartFadeOutAnimation(base::Bind( 250 StartFadeOutAnimation(base::Bind(
252 &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished, 251 &DisplayOptionsHandler::OnFadeOutForDisplayLayoutFinished,
253 base::Unretained(this), 252 base::Unretained(this),
254 static_cast<int>(layout), 253 static_cast<int>(layout),
255 static_cast<int>(offset))); 254 static_cast<int>(offset)));
256 } 255 }
257 256
258 } // namespace options 257 } // namespace options
259 } // namespace chromeos 258 } // 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