| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/settings/chromeos/device_power_handler.h" | 5 #include "chrome/browser/ui/webui/settings/chromeos/device_power_handler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "ash/resources/grit/ash_resources.h" | 10 #include "ash/resources/grit/ash_resources.h" |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 dict->SetString("id", source.id); | 127 dict->SetString("id", source.id); |
| 128 dict->SetInteger("type", source.type); | 128 dict->SetInteger("type", source.type); |
| 129 dict->SetString("description", | 129 dict->SetString("description", |
| 130 l10n_util::GetStringUTF16(source.description_id)); | 130 l10n_util::GetStringUTF16(source.description_id)); |
| 131 sources_list.Append(std::move(dict)); | 131 sources_list.Append(std::move(dict)); |
| 132 } | 132 } |
| 133 | 133 |
| 134 CallJavascriptFunction( | 134 CallJavascriptFunction( |
| 135 "cr.webUIListenerCallback", base::StringValue("power-sources-changed"), | 135 "cr.webUIListenerCallback", base::StringValue("power-sources-changed"), |
| 136 sources_list, base::StringValue(power_status_->GetCurrentPowerSourceID()), | 136 sources_list, base::StringValue(power_status_->GetCurrentPowerSourceID()), |
| 137 base::FundamentalValue(power_status_->IsUsbChargerConnected())); | 137 base::Value(power_status_->IsUsbChargerConnected())); |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace settings | 140 } // namespace settings |
| 141 } // namespace chromeos | 141 } // namespace chromeos |
| OLD | NEW |