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_VPN_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_VPN_CONFIG_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_VPN_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_VPN_CONFIG_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 public views::TextfieldController, | 43 public views::TextfieldController, |
44 public views::ButtonListener, | 44 public views::ButtonListener, |
45 public views::ComboboxListener, | 45 public views::ComboboxListener, |
46 public CertLibrary::Observer { | 46 public CertLibrary::Observer { |
47 public: | 47 public: |
48 VPNConfigView(NetworkConfigView* parent, const std::string& service_path); | 48 VPNConfigView(NetworkConfigView* parent, const std::string& service_path); |
49 virtual ~VPNConfigView(); | 49 virtual ~VPNConfigView(); |
50 | 50 |
51 // views::TextfieldController: | 51 // views::TextfieldController: |
52 virtual void ContentsChanged(views::Textfield* sender, | 52 virtual void ContentsChanged(views::Textfield* sender, |
53 const string16& new_contents) OVERRIDE; | 53 const base::string16& new_contents) OVERRIDE; |
54 virtual bool HandleKeyEvent(views::Textfield* sender, | 54 virtual bool HandleKeyEvent(views::Textfield* sender, |
55 const ui::KeyEvent& key_event) OVERRIDE; | 55 const ui::KeyEvent& key_event) OVERRIDE; |
56 | 56 |
57 // views::ButtonListener: | 57 // views::ButtonListener: |
58 virtual void ButtonPressed(views::Button* sender, | 58 virtual void ButtonPressed(views::Button* sender, |
59 const ui::Event& event) OVERRIDE; | 59 const ui::Event& event) OVERRIDE; |
60 | 60 |
61 // views::ComboboxListener: | 61 // views::ComboboxListener: |
62 virtual void OnSelectedIndexChanged(views::Combobox* combobox) OVERRIDE; | 62 virtual void OnSelectedIndexChanged(views::Combobox* combobox) OVERRIDE; |
63 | 63 |
64 // CertLibrary::Observer: | 64 // CertLibrary::Observer: |
65 virtual void OnCertificatesLoaded(bool initial_load) OVERRIDE; | 65 virtual void OnCertificatesLoaded(bool initial_load) OVERRIDE; |
66 | 66 |
67 // ChildNetworkConfigView: | 67 // ChildNetworkConfigView: |
68 virtual string16 GetTitle() const OVERRIDE; | 68 virtual base::string16 GetTitle() const OVERRIDE; |
69 virtual views::View* GetInitiallyFocusedView() OVERRIDE; | 69 virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
70 virtual bool CanLogin() OVERRIDE; | 70 virtual bool CanLogin() OVERRIDE; |
71 virtual bool Login() OVERRIDE; | 71 virtual bool Login() OVERRIDE; |
72 virtual void Cancel() OVERRIDE; | 72 virtual void Cancel() OVERRIDE; |
73 virtual void InitFocus() OVERRIDE; | 73 virtual void InitFocus() OVERRIDE; |
74 | 74 |
75 private: | 75 private: |
76 // Initializes data members and create UI controls. | 76 // Initializes data members and create UI controls. |
77 void Init(); | 77 void Init(); |
78 | 78 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 int GetProviderTypeIndex() const; | 125 int GetProviderTypeIndex() const; |
126 std::string GetProviderTypeString() const; | 126 std::string GetProviderTypeString() const; |
127 | 127 |
128 // Parses a VPN UI |property| from the given |network|. |key| is the property | 128 // Parses a VPN UI |property| from the given |network|. |key| is the property |
129 // name within the type-specific VPN subdictionary named |dict_key|. | 129 // name within the type-specific VPN subdictionary named |dict_key|. |
130 void ParseVPNUIProperty(const NetworkState* network, | 130 void ParseVPNUIProperty(const NetworkState* network, |
131 const std::string& dict_key, | 131 const std::string& dict_key, |
132 const std::string& key, | 132 const std::string& key, |
133 NetworkPropertyUIData* property_ui_data); | 133 NetworkPropertyUIData* property_ui_data); |
134 | 134 |
135 string16 service_name_from_server_; | 135 base::string16 service_name_from_server_; |
136 bool service_text_modified_; | 136 bool service_text_modified_; |
137 | 137 |
138 // Initialized in Init(): | 138 // Initialized in Init(): |
139 | 139 |
140 bool enable_psk_passphrase_; | 140 bool enable_psk_passphrase_; |
141 bool enable_user_cert_; | 141 bool enable_user_cert_; |
142 bool enable_server_ca_cert_; | 142 bool enable_server_ca_cert_; |
143 bool enable_otp_; | 143 bool enable_otp_; |
144 bool enable_group_name_; | 144 bool enable_group_name_; |
145 | 145 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 std::string client_cert_id_; | 184 std::string client_cert_id_; |
185 | 185 |
186 base::WeakPtrFactory<VPNConfigView> weak_ptr_factory_; | 186 base::WeakPtrFactory<VPNConfigView> weak_ptr_factory_; |
187 | 187 |
188 DISALLOW_COPY_AND_ASSIGN(VPNConfigView); | 188 DISALLOW_COPY_AND_ASSIGN(VPNConfigView); |
189 }; | 189 }; |
190 | 190 |
191 } // namespace chromeos | 191 } // namespace chromeos |
192 | 192 |
193 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_VPN_CONFIG_VIEW_H_ | 193 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_VPN_CONFIG_VIEW_H_ |
OLD | NEW |