| 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_CELLULAR_CONFIG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OPTIONS_CELLULAR_CONFIG_VIEW_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CELLULAR_CONFIG_VIEW_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OPTIONS_CELLULAR_CONFIG_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/cros/network_library.h" | 9 #include "chrome/browser/chromeos/cros/network_library.h" |
| 10 #include "views/controls/button/button.h" | 10 #include "views/controls/button/button.h" |
| 11 #include "views/controls/link.h" | 11 #include "views/controls/link.h" |
| 12 #include "views/view.h" | 12 #include "views/view.h" |
| 13 | 13 |
| 14 namespace views { | 14 namespace views { |
| 15 class Checkbox; | 15 class Checkbox; |
| 16 class Label; | 16 class Label; |
| 17 class NativeButton; | 17 class NativeButton; |
| 18 } // namespace views | 18 } // namespace views |
| 19 | 19 |
| 20 namespace chromeos { | 20 namespace chromeos { |
| 21 | 21 |
| 22 class NetworkConfigView; | 22 class NetworkConfigView; |
| 23 | 23 |
| 24 // A dialog box for showing a password textfield. | 24 // A dialog box for showing a password textfield. |
| 25 class CellularConfigView : public views::View, | 25 class CellularConfigView : public views::View, |
| 26 public views::ButtonListener, | 26 public views::ButtonListener, |
| 27 public views::LinkController { | 27 public views::LinkController { |
| 28 public: | 28 public: |
| 29 CellularConfigView(NetworkConfigView* parent, | 29 CellularConfigView(NetworkConfigView* parent, |
| 30 const CellularNetwork& cellular); | 30 const CellularNetwork* cellular); |
| 31 explicit CellularConfigView(NetworkConfigView* parent); | 31 explicit CellularConfigView(NetworkConfigView* parent); |
| 32 virtual ~CellularConfigView() {} | 32 virtual ~CellularConfigView(); |
| 33 | 33 |
| 34 // views::ButtonListener implementation. | 34 // views::ButtonListener implementation. |
| 35 virtual void ButtonPressed(views::Button* button, const views::Event& event); | 35 virtual void ButtonPressed(views::Button* button, const views::Event& event); |
| 36 | 36 |
| 37 // views::LinkController implementation. | 37 // views::LinkController implementation. |
| 38 virtual void LinkActivated(views::Link* source, int event_flags); | 38 virtual void LinkActivated(views::Link* source, int event_flags); |
| 39 | 39 |
| 40 // Save network information. | 40 // Save network information. |
| 41 virtual bool Save(); | 41 virtual bool Save(); |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 | 44 |
| 45 // Initializes UI. | 45 // Initializes UI. |
| 46 void Init(); | 46 void Init(); |
| 47 | 47 |
| 48 // Updates UI. | 48 // Updates UI. |
| 49 void Update(); | 49 void Update(); |
| 50 | 50 |
| 51 NetworkConfigView* parent_; | 51 NetworkConfigView* parent_; |
| 52 | 52 |
| 53 CellularNetwork cellular_; | 53 scoped_ptr<CellularNetwork> cellular_; |
| 54 | 54 |
| 55 views::Label* purchase_info_; | 55 views::Label* purchase_info_; |
| 56 views::NativeButton* purchase_more_button_; | 56 views::NativeButton* purchase_more_button_; |
| 57 views::Label* remaining_data_info_; | 57 views::Label* remaining_data_info_; |
| 58 views::Label* expiration_info_; | 58 views::Label* expiration_info_; |
| 59 views::Checkbox* show_notification_checkbox_; | 59 views::Checkbox* show_notification_checkbox_; |
| 60 views::Checkbox* autoconnect_checkbox_; | 60 views::Checkbox* autoconnect_checkbox_; |
| 61 views::Link* customer_support_link_; | 61 views::Link* customer_support_link_; |
| 62 | 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(CellularConfigView); | 63 DISALLOW_COPY_AND_ASSIGN(CellularConfigView); |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 } // namespace chromeos | 66 } // namespace chromeos |
| 67 | 67 |
| 68 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CELLULAR_CONFIG_VIEW_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_OPTIONS_CELLULAR_CONFIG_VIEW_H_ |
| OLD | NEW |