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_WIMAX_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_WIMAX_CONFIG_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIMAX_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_WIMAX_CONFIG_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 namespace chromeos { | 26 namespace chromeos { |
27 | 27 |
28 // A dialog box for showing a password textfield. | 28 // A dialog box for showing a password textfield. |
29 class WimaxConfigView : public ChildNetworkConfigView, | 29 class WimaxConfigView : public ChildNetworkConfigView, |
30 public views::TextfieldController, | 30 public views::TextfieldController, |
31 public views::ButtonListener { | 31 public views::ButtonListener { |
32 public: | 32 public: |
33 // Configuration dialog for a WiMax network. If |service_path| is not empty | 33 // Configuration dialog for a WiMax network. If |service_path| is not empty |
34 // it identifies the network to be configured. | 34 // it identifies the network to be configured. |
35 WimaxConfigView(NetworkConfigView* parent, const std::string& service_path); | 35 WimaxConfigView(NetworkConfigView* parent, const std::string& service_path); |
36 virtual ~WimaxConfigView(); | 36 ~WimaxConfigView() override; |
37 | 37 |
38 // views::TextfieldController: | 38 // views::TextfieldController: |
39 virtual void ContentsChanged(views::Textfield* sender, | 39 void ContentsChanged(views::Textfield* sender, |
40 const base::string16& new_contents) override; | 40 const base::string16& new_contents) override; |
41 virtual bool HandleKeyEvent(views::Textfield* sender, | 41 bool HandleKeyEvent(views::Textfield* sender, |
42 const ui::KeyEvent& key_event) override; | 42 const ui::KeyEvent& key_event) override; |
43 | 43 |
44 // views::ButtonListener: | 44 // views::ButtonListener: |
45 virtual void ButtonPressed(views::Button* sender, | 45 void ButtonPressed(views::Button* sender, const ui::Event& event) override; |
46 const ui::Event& event) override; | |
47 | 46 |
48 // ChildNetworkConfigView: | 47 // ChildNetworkConfigView: |
49 virtual base::string16 GetTitle() const override; | 48 base::string16 GetTitle() const override; |
50 virtual views::View* GetInitiallyFocusedView() override; | 49 views::View* GetInitiallyFocusedView() override; |
51 virtual bool CanLogin() override; | 50 bool CanLogin() override; |
52 virtual bool Login() override; | 51 bool Login() override; |
53 virtual void Cancel() override; | 52 void Cancel() override; |
54 virtual void InitFocus() override; | 53 void InitFocus() override; |
55 | 54 |
56 private: | 55 private: |
57 // Initializes UI. | 56 // Initializes UI. |
58 void Init(); | 57 void Init(); |
59 | 58 |
60 // Callback to initialize fields from uncached network properties. | 59 // Callback to initialize fields from uncached network properties. |
61 void InitFromProperties(const std::string& service_path, | 60 void InitFromProperties(const std::string& service_path, |
62 const base::DictionaryValue& dictionary); | 61 const base::DictionaryValue& dictionary); |
63 | 62 |
64 // Get input values. | 63 // Get input values. |
(...skipping 22 matching lines...) Expand all Loading... |
87 views::Label* error_label_; | 86 views::Label* error_label_; |
88 | 87 |
89 base::WeakPtrFactory<WimaxConfigView> weak_ptr_factory_; | 88 base::WeakPtrFactory<WimaxConfigView> weak_ptr_factory_; |
90 | 89 |
91 DISALLOW_COPY_AND_ASSIGN(WimaxConfigView); | 90 DISALLOW_COPY_AND_ASSIGN(WimaxConfigView); |
92 }; | 91 }; |
93 | 92 |
94 } // namespace chromeos | 93 } // namespace chromeos |
95 | 94 |
96 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIMAX_CONFIG_VIEW_H_ | 95 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_WIMAX_CONFIG_VIEW_H_ |
OLD | NEW |