OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace chromeos { | 24 namespace chromeos { |
25 | 25 |
26 class NetworkConfigView; | 26 class NetworkConfigView; |
27 | 27 |
28 // A dialog box for showing a password textfield. | 28 // A dialog box for showing a password textfield. |
29 class WifiConfigView : public views::View, | 29 class WifiConfigView : public views::View, |
30 public views::Textfield::Controller, | 30 public views::Textfield::Controller, |
31 public views::ButtonListener, | 31 public views::ButtonListener, |
32 public SelectFileDialog::Listener { | 32 public SelectFileDialog::Listener { |
33 public: | 33 public: |
34 WifiConfigView(NetworkConfigView* parent, WifiNetwork wifi); | 34 WifiConfigView(NetworkConfigView* parent, const WifiNetwork* wifi); |
35 explicit WifiConfigView(NetworkConfigView* parent); | 35 explicit WifiConfigView(NetworkConfigView* parent); |
36 virtual ~WifiConfigView() {} | 36 virtual ~WifiConfigView(); |
37 | 37 |
38 // views::Textfield::Controller methods. | 38 // views::Textfield::Controller methods. |
39 virtual void ContentsChanged(views::Textfield* sender, | 39 virtual void ContentsChanged(views::Textfield* sender, |
40 const string16& new_contents); | 40 const string16& new_contents); |
41 virtual bool HandleKeystroke(views::Textfield* sender, | 41 virtual bool HandleKeystroke(views::Textfield* sender, |
42 const views::Textfield::Keystroke& keystroke); | 42 const views::Textfield::Keystroke& keystroke); |
43 | 43 |
44 // views::ButtonListener | 44 // views::ButtonListener |
45 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 45 virtual void ButtonPressed(views::Button* sender, const views::Event& event); |
46 | 46 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void UpdateCanViewPassword(); | 79 void UpdateCanViewPassword(); |
80 | 80 |
81 NetworkConfigView* parent_; | 81 NetworkConfigView* parent_; |
82 | 82 |
83 bool other_network_; | 83 bool other_network_; |
84 | 84 |
85 // Whether or not we can log in. This gets recalculated when textfield | 85 // Whether or not we can log in. This gets recalculated when textfield |
86 // contents change. | 86 // contents change. |
87 bool can_login_; | 87 bool can_login_; |
88 | 88 |
89 WifiNetwork wifi_; | 89 scoped_ptr<WifiNetwork> wifi_; |
90 | 90 |
91 views::Textfield* ssid_textfield_; | 91 views::Textfield* ssid_textfield_; |
92 views::Textfield* identity_textfield_; | 92 views::Textfield* identity_textfield_; |
93 views::NativeButton* certificate_browse_button_; | 93 views::NativeButton* certificate_browse_button_; |
94 scoped_refptr<SelectFileDialog> select_file_dialog_; | 94 scoped_refptr<SelectFileDialog> select_file_dialog_; |
95 std::string certificate_path_; | 95 std::string certificate_path_; |
96 views::Textfield* passphrase_textfield_; | 96 views::Textfield* passphrase_textfield_; |
97 views::ImageButton* passphrase_visible_button_; | 97 views::ImageButton* passphrase_visible_button_; |
98 views::Checkbox* autoconnect_checkbox_; | 98 views::Checkbox* autoconnect_checkbox_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); | 100 DISALLOW_COPY_AND_ASSIGN(WifiConfigView); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace chromeos | 103 } // namespace chromeos |
104 | 104 |
105 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ | 105 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIFI_CONFIG_VIEW_H_ |
OLD | NEW |