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

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

Issue 1142005: Mocks for all libcros elements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cros/cros_library.h"
9 #include "chrome/browser/chromeos/options/ip_config_view.h" 10 #include "chrome/browser/chromeos/options/ip_config_view.h"
10 #include "chrome/browser/chromeos/options/wifi_config_view.h" 11 #include "chrome/browser/chromeos/options/wifi_config_view.h"
11 #include "grit/chromium_strings.h" 12 #include "grit/chromium_strings.h"
12 #include "grit/generated_resources.h" 13 #include "grit/generated_resources.h"
13 #include "grit/locale_settings.h" 14 #include "grit/locale_settings.h"
14 #include "views/grid_layout.h" 15 #include "views/grid_layout.h"
15 #include "views/standard_layout.h" 16 #include "views/standard_layout.h"
16 #include "views/window/window.h" 17 #include "views/window/window.h"
17 18
18 namespace chromeos { 19 namespace chromeos {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return true; 68 return true;
68 } 69 }
69 70
70 bool NetworkConfigView::Cancel() { 71 bool NetworkConfigView::Cancel() {
71 return true; 72 return true;
72 } 73 }
73 74
74 bool NetworkConfigView::Accept() { 75 bool NetworkConfigView::Accept() {
75 if (flags_ & FLAG_LOGIN_ONLY) { 76 if (flags_ & FLAG_LOGIN_ONLY) {
76 if (flags_ & FLAG_OTHER_NETWORK) { 77 if (flags_ & FLAG_OTHER_NETWORK) {
77 NetworkLibrary::Get()->ConnectToWifiNetwork(wificonfig_view_->GetSSID(), 78 CrosLibrary::Get()->GetNetworkLibrary()->ConnectToWifiNetwork(
78 wificonfig_view_->GetPassphrase()); 79 wificonfig_view_->GetSSID(), wificonfig_view_->GetPassphrase());
79 } else { 80 } else {
80 NetworkLibrary::Get()->ConnectToWifiNetwork(wifi_, 81 CrosLibrary::Get()->GetNetworkLibrary()->ConnectToWifiNetwork(wifi_,
81 wificonfig_view_->GetPassphrase()); 82 wificonfig_view_->GetPassphrase());
82 } 83 }
83 } else { 84 } else {
84 // TODO(chocobo): Save new ip config data and/or save new passphrase. 85 // TODO(chocobo): Save new ip config data and/or save new passphrase.
85 } 86 }
86 return true; 87 return true;
87 } 88 }
88 89
89 std::wstring NetworkConfigView::GetWindowTitle() const { 90 std::wstring NetworkConfigView::GetWindowTitle() const {
90 if (flags_ & FLAG_OTHER_NETWORK) 91 if (flags_ & FLAG_OTHER_NETWORK)
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 ipconfig_view_ = new IPConfigView(cellular_.device_path); 146 ipconfig_view_ = new IPConfigView(cellular_.device_path);
146 else 147 else
147 ipconfig_view_ = new IPConfigView(ethernet_.device_path); 148 ipconfig_view_ = new IPConfigView(ethernet_.device_path);
148 tabs_->AddTab( 149 tabs_->AddTab(
149 l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_IP_CONFIG), 150 l10n_util::GetString(IDS_OPTIONS_SETTINGS_SECTION_TITLE_IP_CONFIG),
150 ipconfig_view_); 151 ipconfig_view_);
151 } 152 }
152 } 153 }
153 154
154 } // namespace chromeos 155 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/options/language_hangul_config_view.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698