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 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 public views::ComboboxListener, | 50 public views::ComboboxListener, |
51 public CertLibrary::Observer, | 51 public CertLibrary::Observer, |
52 public NetworkStateHandlerObserver { | 52 public NetworkStateHandlerObserver { |
53 public: | 53 public: |
54 // If |service_path| is not empty it identifies the network to be configured. | 54 // If |service_path| is not empty it identifies the network to be configured. |
55 // Otherwise |show_8021x| determines whether or not to show the 'advanced' | 55 // Otherwise |show_8021x| determines whether or not to show the 'advanced' |
56 // 8021x configuration UI for a hidden WiFi network. | 56 // 8021x configuration UI for a hidden WiFi network. |
57 WifiConfigView(NetworkConfigView* parent, | 57 WifiConfigView(NetworkConfigView* parent, |
58 const std::string& service_path, | 58 const std::string& service_path, |
59 bool show_8021x); | 59 bool show_8021x); |
60 virtual ~WifiConfigView(); | 60 ~WifiConfigView() override; |
61 | 61 |
62 // views::TextfieldController | 62 // views::TextfieldController |
63 virtual void ContentsChanged(views::Textfield* sender, | 63 void ContentsChanged(views::Textfield* sender, |
64 const base::string16& new_contents) override; | 64 const base::string16& new_contents) override; |
65 virtual bool HandleKeyEvent(views::Textfield* sender, | 65 bool HandleKeyEvent(views::Textfield* sender, |
66 const ui::KeyEvent& key_event) override; | 66 const ui::KeyEvent& key_event) override; |
67 | 67 |
68 // views::ButtonListener | 68 // views::ButtonListener |
69 virtual void ButtonPressed(views::Button* sender, | 69 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
70 const ui::Event& event) override; | |
71 | 70 |
72 // views::ComboboxListener | 71 // views::ComboboxListener |
73 virtual void OnPerformAction(views::Combobox* combobox) override; | 72 void OnPerformAction(views::Combobox* combobox) override; |
74 | 73 |
75 // CertLibrary::Observer | 74 // CertLibrary::Observer |
76 virtual void OnCertificatesLoaded(bool initial_load) override; | 75 void OnCertificatesLoaded(bool initial_load) override; |
77 | 76 |
78 // ChildNetworkConfigView | 77 // ChildNetworkConfigView |
79 virtual base::string16 GetTitle() const override; | 78 base::string16 GetTitle() const override; |
80 virtual views::View* GetInitiallyFocusedView() override; | 79 views::View* GetInitiallyFocusedView() override; |
81 virtual bool CanLogin() override; | 80 bool CanLogin() override; |
82 virtual bool Login() override; | 81 bool Login() override; |
83 virtual void Cancel() override; | 82 void Cancel() override; |
84 virtual void InitFocus() override; | 83 void InitFocus() override; |
85 virtual bool IsConfigureDialog() override; | 84 bool IsConfigureDialog() override; |
86 | 85 |
87 // NetworkStateHandlerObserver | 86 // NetworkStateHandlerObserver |
88 virtual void NetworkPropertiesUpdated(const NetworkState* network) override; | 87 void NetworkPropertiesUpdated(const NetworkState* network) override; |
89 | 88 |
90 // Parses a UI |property| from the ONC associated with |network|. |key| | 89 // Parses a UI |property| from the ONC associated with |network|. |key| |
91 // is the property name within the ONC dictionary. | 90 // is the property name within the ONC dictionary. |
92 static void ParseUIProperty(NetworkPropertyUIData* property_ui_data, | 91 static void ParseUIProperty(NetworkPropertyUIData* property_ui_data, |
93 const NetworkState* network, | 92 const NetworkState* network, |
94 const std::string& key); | 93 const std::string& key); |
95 | 94 |
96 // Parses an EAP UI |property| from the ONC associated with |network|. | 95 // Parses an EAP UI |property| from the ONC associated with |network|. |
97 // |key| is the property name within the ONC EAP dictionary. | 96 // |key| is the property name within the ONC EAP dictionary. |
98 static void ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, | 97 static void ParseEAPUIProperty(NetworkPropertyUIData* property_ui_data, |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 views::Label* error_label_; | 212 views::Label* error_label_; |
214 | 213 |
215 base::WeakPtrFactory<WifiConfigView> weak_ptr_factory_; | 214 base::WeakPtrFactory<WifiConfigView> weak_ptr_factory_; |
216 | 215 |
217 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); | 216 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); |
218 }; | 217 }; |
219 | 218 |
220 } // namespace chromeos | 219 } // namespace chromeos |
221 | 220 |
222 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 221 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
OLD | NEW |