Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4506)

Unified Diff: chrome/browser/chromeos/login/network_screen.h

Issue 3166028: Replace network combobox with network dropdown button (Closed)
Patch Set: Removed trailing spaces Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/network_screen.h
diff --git a/chrome/browser/chromeos/login/network_screen.h b/chrome/browser/chromeos/login/network_screen.h
index f272a1a7a1ea6994adaba5fb6e43748cc6784ee4..36392737f67a86bf012199fa07f110867cfb6747 100644
--- a/chrome/browser/chromeos/login/network_screen.h
+++ b/chrome/browser/chromeos/login/network_screen.h
@@ -23,10 +23,9 @@ namespace chromeos {
class NetworkSelectionView;
class NetworkScreen : public ViewScreen<NetworkSelectionView>,
- public NetworkScreenDelegate,
- public NetworkConfigView::Delegate {
+ public NetworkScreenDelegate {
public:
- NetworkScreen(WizardScreenDelegate* delegate, bool is_out_of_box);
+ explicit NetworkScreen(WizardScreenDelegate* delegate);
virtual ~NetworkScreen();
// NetworkScreenDelegate implementation:
@@ -34,25 +33,12 @@ class NetworkScreen : public ViewScreen<NetworkSelectionView>,
return &language_switch_menu_;
}
- // ComboboxModel implementation:
- virtual int GetItemCount();
- virtual string16 GetItemAt(int index);
-
- // views::Combobox::Listener implementation:
- virtual void ItemChanged(views::Combobox* sender,
- int prev_index,
- int new_index);
-
// views::ButtonListener implementation:
virtual void ButtonPressed(views::Button* sender, const views::Event& event);
// NetworkLibrary::Observer implementation:
virtual void NetworkChanged(NetworkLibrary* network_lib);
- // NetworkConfigView::Delegate implementation:
- virtual void OnDialogAccepted();
- virtual void OnDialogCancelled();
-
protected:
// Subscribes NetworkScreen to the network change notification,
// forces refresh of current network state.
@@ -63,73 +49,40 @@ class NetworkScreen : public ViewScreen<NetworkSelectionView>,
virtual void CreateView();
virtual NetworkSelectionView* AllocateView();
- // Connects to network if needed and updates screen state.
- void ConnectToNetwork(NetworkList::NetworkType type, const string16& id);
-
- // Enables WiFi device.
- void EnableWiFi();
-
// Subscribes to network change notifications.
void SubscribeNetworkNotification();
// Unsubscribes from network change notifications.
void UnsubscribeNetworkNotification();
- // Returns currently selected network in the combobox.
- NetworkList::NetworkItem* GetSelectedNetwork();
-
// Notifies wizard on successful connection.
void NotifyOnConnection();
// Called by |connection_timer_| when connection to the network timed out.
void OnConnectionTimeout();
- // Opens password dialog for the encrypted networks.
- void OpenPasswordDialog(WifiNetwork network);
-
- // Selects network by type and id.
- void SelectNetwork(NetworkList::NetworkType type,
- const string16& id);
-
- // Switches connecting status based on |is_waiting_for_connect_|.
- void ShowConnectingStatus();
+ // Update UI based on current network status.
+ void UpdateStatus(NetworkLibrary* network);
// Stops waiting for network to connect.
- // If |show_combobox| is false, spinner is left on screen. Used on exit.
- void StopWaitingForConnection(bool show_combobox);
+ void StopWaitingForConnection(const string16& network_id);
// Starts waiting for network connection. Shows spinner.
- void WaitForConnection(const NetworkList::NetworkItem* network);
+ void WaitForConnection(const string16& network_id);
// True if subscribed to network change notification.
bool is_network_subscribed_;
- // Networks model, contains current state of available networks.
- NetworkList networks_;
-
- // True if WiFi is currently disabled.
- bool wifi_disabled_;
-
- // True if full OOBE flow should be shown.
- bool is_out_of_box_;
+ // ID of the the network that we are waiting for.
+ string16 network_id_;
- // True if we're waiting for the selected network being connected.
- bool is_waiting_for_connect_;
-
- // True if "Continue" button was pressed.
- // Set only when there's a network selected.
+ // True if user pressed continue button so we should proceed with OOBE
+ // as soon as we are connected.
bool continue_pressed_;
- // True if Ethernet was already preselected in combobox.
- bool ethernet_preselected_;
-
// Timer for connection timeout.
base::OneShotTimer<NetworkScreen> connection_timer_;
- // Network which we're connecting to.
- NetworkList::NetworkItem connecting_network_;
-
- ScopedRunnableMethodFactory<NetworkScreen> task_factory_;
LanguageSwitchMenu language_switch_menu_;
DISALLOW_COPY_AND_ASSIGN(NetworkScreen);
« no previous file with comments | « chrome/browser/chromeos/dom_ui/internet_options_handler.cc ('k') | chrome/browser/chromeos/login/network_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698