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

Side by Side Diff: chrome/browser/chromeos/dom_ui/internet_options_handler.cc

Issue 4572001: Pass wifi available/enabled status to JS at initialization. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix whitespaces. Created 10 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos_internet_options.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/chromeos/dom_ui/internet_options_handler.h" 5 #include "chrome/browser/chromeos/dom_ui/internet_options_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 l10n_util::GetStringUTF16(IDS_OK)); 294 l10n_util::GetStringUTF16(IDS_OK));
295 localized_strings->SetString("detailsInternetDismiss", 295 localized_strings->SetString("detailsInternetDismiss",
296 l10n_util::GetStringUTF16(IDS_CANCEL)); 296 l10n_util::GetStringUTF16(IDS_CANCEL));
297 297
298 localized_strings->Set("wiredList", GetWiredList()); 298 localized_strings->Set("wiredList", GetWiredList());
299 localized_strings->Set("wirelessList", GetWirelessList()); 299 localized_strings->Set("wirelessList", GetWirelessList());
300 localized_strings->Set("rememberedList", GetRememberedList()); 300 localized_strings->Set("rememberedList", GetRememberedList());
301 301
302 chromeos::NetworkLibrary* cros = 302 chromeos::NetworkLibrary* cros =
303 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); 303 chromeos::CrosLibrary::Get()->GetNetworkLibrary();
304 localized_strings->SetBoolean("wifiAvailable", cros->wifi_available());
305 localized_strings->SetBoolean("wifiEnabled", cros->wifi_enabled());
304 localized_strings->SetBoolean("cellularAvailable", 306 localized_strings->SetBoolean("cellularAvailable",
305 cros->cellular_available()); 307 cros->cellular_available());
306 localized_strings->SetBoolean("cellularEnabled", cros->cellular_enabled()); 308 localized_strings->SetBoolean("cellularEnabled", cros->cellular_enabled());
307 } 309 }
308 310
309 void InternetOptionsHandler::RegisterMessages() { 311 void InternetOptionsHandler::RegisterMessages() {
310 // Setup handlers specific to this panel. 312 // Setup handlers specific to this panel.
311 DCHECK(dom_ui_); 313 DCHECK(dom_ui_);
312 dom_ui_->RegisterMessageCallback("buttonClickCallback", 314 dom_ui_->RegisterMessageCallback("buttonClickCallback",
313 NewCallback(this, &InternetOptionsHandler::ButtonClickCallback)); 315 NewCallback(this, &InternetOptionsHandler::ButtonClickCallback));
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1027 (*it)->name(), 1029 (*it)->name(),
1028 (*it)->connecting(), 1030 (*it)->connecting(),
1029 (*it)->connected(), 1031 (*it)->connected(),
1030 chromeos::TYPE_WIFI, 1032 chromeos::TYPE_WIFI,
1031 true, 1033 true,
1032 chromeos::ACTIVATION_STATE_UNKNOWN, 1034 chromeos::ACTIVATION_STATE_UNKNOWN,
1033 false)); 1035 false));
1034 } 1036 }
1035 return list; 1037 return list;
1036 } 1038 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos_internet_options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698