| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 MessageBoxFlags::DialogButton button) const { | 46 MessageBoxFlags::DialogButton button) const { |
| 47 if (button == MessageBoxFlags::DIALOGBUTTON_OK) | 47 if (button == MessageBoxFlags::DIALOGBUTTON_OK) |
| 48 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_CONNECT)); | 48 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_SETTINGS_CONNECT)); |
| 49 return std::wstring(); | 49 return std::wstring(); |
| 50 } | 50 } |
| 51 | 51 |
| 52 bool NetworkConfigView::IsDialogButtonEnabled( | 52 bool NetworkConfigView::IsDialogButtonEnabled( |
| 53 MessageBoxFlags::DialogButton button) const { | 53 MessageBoxFlags::DialogButton button) const { |
| 54 // Disable connect button if cannot login. | 54 // Disable connect button if cannot login. |
| 55 if (button == MessageBoxFlags::DIALOGBUTTON_OK) | 55 if (button == MessageBoxFlags::DIALOGBUTTON_OK) |
| 56 return wificonfig_view_->can_login(); | 56 return wificonfig_view_->CanLogin(); |
| 57 return true; | 57 return true; |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool NetworkConfigView::Cancel() { | 60 bool NetworkConfigView::Cancel() { |
| 61 if (delegate_) | 61 if (delegate_) |
| 62 delegate_->OnDialogCancelled(); | 62 delegate_->OnDialogCancelled(); |
| 63 wificonfig_view_->Cancel(); | 63 wificonfig_view_->Cancel(); |
| 64 return true; | 64 return true; |
| 65 } | 65 } |
| 66 | 66 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 90 | 90 |
| 91 void NetworkConfigView::ViewHierarchyChanged( | 91 void NetworkConfigView::ViewHierarchyChanged( |
| 92 bool is_add, views::View* parent, views::View* child) { | 92 bool is_add, views::View* parent, views::View* child) { |
| 93 // Can't init before we're inserted into a Container, because we require | 93 // Can't init before we're inserted into a Container, because we require |
| 94 // a HWND to parent native child controls to. | 94 // a HWND to parent native child controls to. |
| 95 if (is_add && child == this) | 95 if (is_add && child == this) |
| 96 AddChildView(wificonfig_view_); | 96 AddChildView(wificonfig_view_); |
| 97 } | 97 } |
| 98 | 98 |
| 99 } // namespace chromeos | 99 } // namespace chromeos |
| OLD | NEW |