| 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/options2/chromeos/internet_options_handler2.h" | 5 #include "chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h" |
| 6 | 6 |
| 7 #include <ctype.h> | 7 #include <ctype.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 RegisterTitle(localized_strings, "internetPage", | 434 RegisterTitle(localized_strings, "internetPage", |
| 435 IDS_OPTIONS_INTERNET_TAB_LABEL); | 435 IDS_OPTIONS_INTERNET_TAB_LABEL); |
| 436 | 436 |
| 437 std::string owner; | 437 std::string owner; |
| 438 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); | 438 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); |
| 439 localized_strings->SetString("ownerUserId", UTF8ToUTF16(owner)); | 439 localized_strings->SetString("ownerUserId", UTF8ToUTF16(owner)); |
| 440 | 440 |
| 441 FillNetworkInfo(localized_strings); | 441 FillNetworkInfo(localized_strings); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void InternetOptionsHandler::Initialize() { | 444 void InternetOptionsHandler::InitializePage() { |
| 445 cros_->RequestNetworkScan(); | 445 cros_->RequestNetworkScan(); |
| 446 } | 446 } |
| 447 | 447 |
| 448 void InternetOptionsHandler::RegisterMessages() { | 448 void InternetOptionsHandler::RegisterMessages() { |
| 449 // Setup handlers specific to this panel. | 449 // Setup handlers specific to this panel. |
| 450 web_ui()->RegisterMessageCallback("buttonClickCallback", | 450 web_ui()->RegisterMessageCallback("buttonClickCallback", |
| 451 base::Bind(&InternetOptionsHandler::ButtonClickCallback, | 451 base::Bind(&InternetOptionsHandler::ButtonClickCallback, |
| 452 base::Unretained(this))); | 452 base::Unretained(this))); |
| 453 web_ui()->RegisterMessageCallback("refreshCellularPlan", | 453 web_ui()->RegisterMessageCallback("refreshCellularPlan", |
| 454 base::Bind(&InternetOptionsHandler::RefreshCellularPlanCallback, | 454 base::Bind(&InternetOptionsHandler::RefreshCellularPlanCallback, |
| (...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1302 if (default_value) | 1302 if (default_value) |
| 1303 value_dict->Set("default", default_value->DeepCopy()); | 1303 value_dict->Set("default", default_value->DeepCopy()); |
| 1304 if (ui_data.managed()) | 1304 if (ui_data.managed()) |
| 1305 value_dict->SetString("controlledBy", "policy"); | 1305 value_dict->SetString("controlledBy", "policy"); |
| 1306 else if (ui_data.recommended()) | 1306 else if (ui_data.recommended()) |
| 1307 value_dict->SetString("controlledBy", "recommended"); | 1307 value_dict->SetString("controlledBy", "recommended"); |
| 1308 settings->Set(key, value_dict); | 1308 settings->Set(key, value_dict); |
| 1309 } | 1309 } |
| 1310 | 1310 |
| 1311 } // namespace options2 | 1311 } // namespace options2 |
| OLD | NEW |