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_NETWORK_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 virtual void OnDialogAccepted() = 0; | 35 virtual void OnDialogAccepted() = 0; |
36 | 36 |
37 // Called when dialog "Cancel" button is pressed. | 37 // Called when dialog "Cancel" button is pressed. |
38 virtual void OnDialogCancelled() = 0; | 38 virtual void OnDialogCancelled() = 0; |
39 | 39 |
40 protected: | 40 protected: |
41 virtual ~Delegate() {} | 41 virtual ~Delegate() {} |
42 }; | 42 }; |
43 | 43 |
44 // Configure dialog for ethernet. | 44 // Configure dialog for ethernet. |
45 explicit NetworkConfigView(EthernetNetwork ethernet); | 45 explicit NetworkConfigView(const EthernetNetwork* ethernet); |
46 // Configure dialog for wifi. If |login_only|, then only show login tab. | 46 // Configure dialog for wifi. If |login_only|, then only show login tab. |
47 explicit NetworkConfigView(WifiNetwork wifi, bool login_only); | 47 explicit NetworkConfigView(const WifiNetwork* wifi, bool login_only); |
48 // Configure dialog for cellular. | 48 // Configure dialog for cellular. |
49 explicit NetworkConfigView(CellularNetwork cellular); | 49 explicit NetworkConfigView(const CellularNetwork* cellular); |
50 // Login dialog for hidden networks. | 50 // Login dialog for hidden networks. |
51 explicit NetworkConfigView(); | 51 explicit NetworkConfigView(); |
52 virtual ~NetworkConfigView() {} | 52 virtual ~NetworkConfigView(); |
53 | 53 |
54 // Returns corresponding native window. | 54 // Returns corresponding native window. |
55 gfx::NativeWindow GetNativeWindow() const; | 55 gfx::NativeWindow GetNativeWindow() const; |
56 | 56 |
57 // views::DialogDelegate methods. | 57 // views::DialogDelegate methods. |
58 virtual std::wstring GetDialogButtonLabel( | 58 virtual std::wstring GetDialogButtonLabel( |
59 MessageBoxFlags::DialogButton button) const; | 59 MessageBoxFlags::DialogButton button) const; |
60 virtual bool IsDialogButtonEnabled( | 60 virtual bool IsDialogButtonEnabled( |
61 MessageBoxFlags::DialogButton button) const; | 61 MessageBoxFlags::DialogButton button) const; |
62 virtual bool Cancel(); | 62 virtual bool Cancel(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 void Init(); | 109 void Init(); |
110 | 110 |
111 // True when opening in browser, otherwise in OOBE/login mode. | 111 // True when opening in browser, otherwise in OOBE/login mode. |
112 bool browser_mode_; | 112 bool browser_mode_; |
113 | 113 |
114 views::TabbedPane* tabs_; | 114 views::TabbedPane* tabs_; |
115 | 115 |
116 // NetworkConfigFlags to specify which UIs to show. | 116 // NetworkConfigFlags to specify which UIs to show. |
117 int flags_; | 117 int flags_; |
118 | 118 |
119 EthernetNetwork ethernet_; | 119 EthernetNetwork* ethernet_; |
120 WifiNetwork wifi_; | 120 WifiNetwork* wifi_; |
121 CellularNetwork cellular_; | 121 CellularNetwork* cellular_; |
122 | 122 |
123 CellularConfigView* cellularconfig_view_; | 123 CellularConfigView* cellularconfig_view_; |
124 WifiConfigView* wificonfig_view_; | 124 WifiConfigView* wificonfig_view_; |
125 IPConfigView* ipconfig_view_; | 125 IPConfigView* ipconfig_view_; |
126 | 126 |
127 Delegate* delegate_; | 127 Delegate* delegate_; |
128 | 128 |
129 DISALLOW_COPY_AND_ASSIGN(NetworkConfigView); | 129 DISALLOW_COPY_AND_ASSIGN(NetworkConfigView); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace chromeos | 132 } // namespace chromeos |
133 | 133 |
134 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ | 134 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_NETWORK_CONFIG_VIEW_H_ |
OLD | NEW |