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