| 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/chromeos/options/wifi_config_view.h" | 5 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
| 6 | 6 |
| 7 #include "ash/system/chromeos/network/network_connect.h" | 7 #include "ash/system/chromeos/network/network_connect.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 // Combobox that supports a preferred width. Used by Server CA combobox | 49 // Combobox that supports a preferred width. Used by Server CA combobox |
| 50 // because the strings inside it are too wide. | 50 // because the strings inside it are too wide. |
| 51 class ComboboxWithWidth : public views::Combobox { | 51 class ComboboxWithWidth : public views::Combobox { |
| 52 public: | 52 public: |
| 53 ComboboxWithWidth(ui::ComboboxModel* model, int width) | 53 ComboboxWithWidth(ui::ComboboxModel* model, int width) |
| 54 : Combobox(model), | 54 : Combobox(model), |
| 55 width_(width) { | 55 width_(width) { |
| 56 } | 56 } |
| 57 virtual ~ComboboxWithWidth() {} | 57 virtual ~ComboboxWithWidth() {} |
| 58 virtual gfx::Size GetPreferredSize() OVERRIDE { | 58 virtual gfx::Size GetPreferredSize() const OVERRIDE { |
| 59 gfx::Size size = Combobox::GetPreferredSize(); | 59 gfx::Size size = Combobox::GetPreferredSize(); |
| 60 size.set_width(width_); | 60 size.set_width(width_); |
| 61 return size; | 61 return size; |
| 62 } | 62 } |
| 63 private: | 63 private: |
| 64 int width_; | 64 int width_; |
| 65 DISALLOW_COPY_AND_ASSIGN(ComboboxWithWidth); | 65 DISALLOW_COPY_AND_ASSIGN(ComboboxWithWidth); |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 enum SecurityComboboxIndex { | 68 enum SecurityComboboxIndex { |
| (...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 1375 void WifiConfigView::ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
| 1376 const NetworkState* network, | 1376 const NetworkState* network, |
| 1377 const std::string& key) { | 1377 const std::string& key) { |
| 1378 std::string onc_tag = network->type() == shill::kTypeEthernet | 1378 std::string onc_tag = network->type() == shill::kTypeEthernet |
| 1379 ? ::onc::ethernet::kEAP | 1379 ? ::onc::ethernet::kEAP |
| 1380 : ::onc::wifi::kEAP; | 1380 : ::onc::wifi::kEAP; |
| 1381 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); | 1381 ParseUIProperty(property_ui_data, network, onc_tag + '.' + key); |
| 1382 } | 1382 } |
| 1383 | 1383 |
| 1384 } // namespace chromeos | 1384 } // namespace chromeos |
| OLD | NEW |