Chromium Code Reviews

Side by Side Diff: chrome/browser/chromeos/options/network_config_view.cc

Issue 2010001: Refactor WifiNetwork, CellularNetwork, and EthernetNetwork into classes to ma... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 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/options/network_config_view.h" 5 #include "chrome/browser/chromeos/options/network_config_view.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "chrome/browser/chromeos/options/ip_config_view.h" 9 #include "chrome/browser/chromeos/options/ip_config_view.h"
10 #include "chrome/browser/chromeos/options/wifi_config_view.h" 10 #include "chrome/browser/chromeos/options/wifi_config_view.h"
11 #include "grit/chromium_strings.h" 11 #include "grit/chromium_strings.h"
(...skipping 66 matching lines...)
78 else 78 else
79 return wificonfig_view_->Save(); 79 return wificonfig_view_->Save();
80 } 80 }
81 return true; 81 return true;
82 } 82 }
83 83
84 std::wstring NetworkConfigView::GetWindowTitle() const { 84 std::wstring NetworkConfigView::GetWindowTitle() const {
85 if (flags_ & FLAG_OTHER_NETWORK) 85 if (flags_ & FLAG_OTHER_NETWORK)
86 return l10n_util::GetString(IDS_OPTIONS_SETTINGS_OTHER_NETWORKS); 86 return l10n_util::GetString(IDS_OPTIONS_SETTINGS_OTHER_NETWORKS);
87 if (flags_ & FLAG_WIFI) 87 if (flags_ & FLAG_WIFI)
88 return ASCIIToWide(wifi_.ssid); 88 return ASCIIToWide(wifi_.name());
89 if (flags_ & FLAG_CELLULAR) 89 if (flags_ & FLAG_CELLULAR)
90 return ASCIIToWide(cellular_.name); 90 return ASCIIToWide(cellular_.name());
91 return l10n_util::GetString(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET); 91 return l10n_util::GetString(IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET);
92 } 92 }
93 93
94 void NetworkConfigView::TabSelectedAt(int index) { 94 void NetworkConfigView::TabSelectedAt(int index) {
95 } 95 }
96 96
97 void NetworkConfigView::SetLoginTextfieldFocus() { 97 void NetworkConfigView::SetLoginTextfieldFocus() {
98 wificonfig_view_->FocusFirstField(); 98 wificonfig_view_->FocusFirstField();
99 } 99 }
100 100
(...skipping 27 matching lines...)
128 wificonfig_view_ = new WifiConfigView(this); 128 wificonfig_view_ = new WifiConfigView(this);
129 else 129 else
130 wificonfig_view_ = new WifiConfigView(this, wifi_); 130 wificonfig_view_ = new WifiConfigView(this, wifi_);
131 tabs_->AddTab( 131 tabs_->AddTab(
132 l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIFI_CONFIG), 132 l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIFI_CONFIG),
133 wificonfig_view_); 133 wificonfig_view_);
134 } 134 }
135 135
136 if (flags_ & FLAG_SHOW_IPCONFIG) { 136 if (flags_ & FLAG_SHOW_IPCONFIG) {
137 if (flags_ & FLAG_WIFI) 137 if (flags_ & FLAG_WIFI)
138 ipconfig_view_ = new IPConfigView(wifi_.device_path); 138 ipconfig_view_ = new IPConfigView(wifi_.device_path());
139 else if (flags_ & FLAG_CELLULAR) 139 else if (flags_ & FLAG_CELLULAR)
140 ipconfig_view_ = new IPConfigView(cellular_.device_path); 140 ipconfig_view_ = new IPConfigView(cellular_.device_path());
141 else 141 else
142 ipconfig_view_ = new IPConfigView(ethernet_.device_path); 142 ipconfig_view_ = new IPConfigView(ethernet_.device_path());
143 tabs_->AddTab( 143 tabs_->AddTab(
144 l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_IP_CONFIG), 144 l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_IP_CONFIG),
145 ipconfig_view_); 145 ipconfig_view_);
146 } 146 }
147 } 147 }
148 148
149 } // namespace chromeos 149 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/internet_page_view.cc ('k') | chrome/browser/chromeos/options/wifi_config_view.cc » ('j') | no next file with comments »

Powered by Google App Engine