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

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

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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_configurator_animation.h" 9 #include "ash/display/display_configurator_animation.h"
10 #include "ash/display/display_controller.h" 10 #include "ash/display/display_controller.h"
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 continue; 296 continue;
297 base::DictionaryValue* color_profile_dict = new base::DictionaryValue(); 297 base::DictionaryValue* color_profile_dict = new base::DictionaryValue();
298 color_profile_dict->SetInteger("profileId", color_profile); 298 color_profile_dict->SetInteger("profileId", color_profile);
299 color_profile_dict->SetString("name", profile_name); 299 color_profile_dict->SetString("name", profile_name);
300 available_color_profiles->Append(color_profile_dict); 300 available_color_profiles->Append(color_profile_dict);
301 } 301 }
302 js_display->Set("availableColorProfiles", available_color_profiles); 302 js_display->Set("availableColorProfiles", available_color_profiles);
303 js_displays.Append(js_display); 303 js_displays.Append(js_display);
304 } 304 }
305 305
306 scoped_ptr<base::Value> layout_value(base::Value::CreateNullValue()); 306 scoped_ptr<base::Value> layout_value = base::Value::CreateNullValue();
307 scoped_ptr<base::Value> offset_value(base::Value::CreateNullValue()); 307 scoped_ptr<base::Value> offset_value = base::Value::CreateNullValue();
308 if (display_manager->GetNumDisplays() > 1) { 308 if (display_manager->GetNumDisplays() > 1) {
309 const ash::DisplayLayout layout = 309 const ash::DisplayLayout layout =
310 display_manager->GetCurrentDisplayLayout(); 310 display_manager->GetCurrentDisplayLayout();
311 layout_value.reset(new base::FundamentalValue(layout.position)); 311 layout_value.reset(new base::FundamentalValue(layout.position));
312 offset_value.reset(new base::FundamentalValue(layout.offset)); 312 offset_value.reset(new base::FundamentalValue(layout.offset));
313 } 313 }
314 314
315 web_ui()->CallJavascriptFunction( 315 web_ui()->CallJavascriptFunction(
316 "options.DisplayOptions.setDisplayInfo", 316 "options.DisplayOptions.setDisplayInfo",
317 mirroring, js_displays, *layout_value.get(), *offset_value.get()); 317 mirroring, js_displays, *layout_value.get(), *offset_value.get());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 return; 466 return;
467 } 467 }
468 468
469 GetDisplayManager()->SetColorCalibrationProfile( 469 GetDisplayManager()->SetColorCalibrationProfile(
470 display_id, static_cast<ui::ColorCalibrationProfile>(profile_id)); 470 display_id, static_cast<ui::ColorCalibrationProfile>(profile_id));
471 SendAllDisplayInfo(); 471 SendAllDisplayInfo();
472 } 472 }
473 473
474 } // namespace options 474 } // namespace options
475 } // namespace chromeos 475 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698