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/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" |
11 #include "chrome/browser/chromeos/login/base_login_display_host.h" | 11 #include "chrome/browser/chromeos/login/base_login_display_host.h" |
12 #include "chrome/browser/chromeos/options/vpn_config_view.h" | 12 #include "chrome/browser/chromeos/options/vpn_config_view.h" |
13 #include "chrome/browser/chromeos/options/wifi_config_view.h" | 13 #include "chrome/browser/chromeos/options/wifi_config_view.h" |
| 14 #include "chrome/browser/chromeos/options/wimax_config_view.h" |
14 #include "chrome/browser/profiles/profile_manager.h" | 15 #include "chrome/browser/profiles/profile_manager.h" |
15 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_finder.h" | 17 #include "chrome/browser/ui/browser_finder.h" |
17 #include "chrome/browser/ui/browser_window.h" | 18 #include "chrome/browser/ui/browser_window.h" |
18 #include "grit/chromium_strings.h" | 19 #include "grit/chromium_strings.h" |
19 #include "grit/generated_resources.h" | 20 #include "grit/generated_resources.h" |
20 #include "grit/locale_settings.h" | 21 #include "grit/locale_settings.h" |
21 #include "grit/theme_resources.h" | 22 #include "grit/theme_resources.h" |
22 #include "ui/base/accessibility/accessible_view_state.h" | 23 #include "ui/base/accessibility/accessible_view_state.h" |
23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 68 |
68 NetworkConfigView::NetworkConfigView(Network* network) | 69 NetworkConfigView::NetworkConfigView(Network* network) |
69 : delegate_(NULL), | 70 : delegate_(NULL), |
70 advanced_button_(NULL), | 71 advanced_button_(NULL), |
71 advanced_button_container_(NULL) { | 72 advanced_button_container_(NULL) { |
72 DCHECK(GetActiveDialog() == NULL); | 73 DCHECK(GetActiveDialog() == NULL); |
73 SetActiveDialog(this); | 74 SetActiveDialog(this); |
74 if (network->type() == TYPE_WIFI) { | 75 if (network->type() == TYPE_WIFI) { |
75 child_config_view_ = | 76 child_config_view_ = |
76 new WifiConfigView(this, static_cast<WifiNetwork*>(network)); | 77 new WifiConfigView(this, static_cast<WifiNetwork*>(network)); |
| 78 } else if (network->type() == TYPE_WIMAX) { |
| 79 child_config_view_ = |
| 80 new WimaxConfigView(this, static_cast<WimaxNetwork*>(network)); |
77 } else if (network->type() == TYPE_VPN) { | 81 } else if (network->type() == TYPE_VPN) { |
78 child_config_view_ = | 82 child_config_view_ = |
79 new VPNConfigView(this, static_cast<VirtualNetwork*>(network)); | 83 new VPNConfigView(this, static_cast<VirtualNetwork*>(network)); |
80 } else { | 84 } else { |
81 NOTREACHED(); | 85 NOTREACHED(); |
82 child_config_view_ = NULL; | 86 child_config_view_ = NULL; |
83 } | 87 } |
84 } | 88 } |
85 | 89 |
86 NetworkConfigView::NetworkConfigView(ConnectionType type) | 90 NetworkConfigView::NetworkConfigView(ConnectionType type) |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 image_view_ = new views::ImageView(); | 321 image_view_ = new views::ImageView(); |
318 // Disable |image_view_| so mouse events propagate to the parent. | 322 // Disable |image_view_| so mouse events propagate to the parent. |
319 image_view_->SetEnabled(false); | 323 image_view_->SetEnabled(false); |
320 image_view_->SetImage(gray_image_); | 324 image_view_->SetImage(gray_image_); |
321 image_view_->SetTooltipText( | 325 image_view_->SetTooltipText( |
322 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); | 326 l10n_util::GetStringUTF16(IDS_OPTIONS_CONTROLLED_SETTING_POLICY)); |
323 AddChildView(image_view_); | 327 AddChildView(image_view_); |
324 } | 328 } |
325 | 329 |
326 } // namespace chromeos | 330 } // namespace chromeos |
OLD | NEW |