summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/options
diff options
context:
space:
mode:
authornkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 13:50:44 +0000
committernkostylev@google.com <nkostylev@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-25 13:50:44 +0000
commita697dcc6b45d4831d3fd53afe8f6463461b3ed0f (patch)
tree4d996fdc93dd7b791ddfcf72b3ac66f2761bb8d1 /chrome/browser/chromeos/options
parent79ea90be68675c0366173334b269f15f156e2dbf (diff)
downloadchromium_src-a697dcc6b45d4831d3fd53afe8f6463461b3ed0f.zip
chromium_src-a697dcc6b45d4831d3fd53afe8f6463461b3ed0f.tar.gz
chromium_src-a697dcc6b45d4831d3fd53afe8f6463461b3ed0f.tar.bz2
Update welcome screen based on mocks.
- Wizard is proceed to the next screen once "Continue" button is clicked and selected network is connected. - Preselect Ethernet if it's connected. - Clear selection when encrypted network dialog has been cancelled. - Ask for network selection when connection timed out. - Support list of connected/connecting networks. BUG=cros:3279, cros:3306 TEST=Welcome screen & network selection should work. Review URL: http://codereview.chromium.org/2077019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48146 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/options')
-rw-r--r--chrome/browser/chromeos/options/network_config_view.cc14
-rw-r--r--chrome/browser/chromeos/options/network_config_view.h14
2 files changed, 24 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/options/network_config_view.cc b/chrome/browser/chromeos/options/network_config_view.cc
index f5aa05e..e3ea604 100644
--- a/chrome/browser/chromeos/options/network_config_view.cc
+++ b/chrome/browser/chromeos/options/network_config_view.cc
@@ -25,7 +25,8 @@ NetworkConfigView::NetworkConfigView(EthernetNetwork ethernet)
flags_(FLAG_ETHERNET | FLAG_SHOW_IPCONFIG),
ethernet_(ethernet),
wificonfig_view_(NULL),
- ipconfig_view_(NULL) {
+ ipconfig_view_(NULL),
+ delegate_(NULL) {
}
NetworkConfigView::NetworkConfigView(WifiNetwork wifi, bool login_only)
@@ -33,7 +34,8 @@ NetworkConfigView::NetworkConfigView(WifiNetwork wifi, bool login_only)
flags_(FLAG_WIFI),
wifi_(wifi),
wificonfig_view_(NULL),
- ipconfig_view_(NULL) {
+ ipconfig_view_(NULL),
+ delegate_(NULL) {
if (login_only)
flags_ |= FLAG_LOGIN_ONLY;
else
@@ -45,14 +47,16 @@ NetworkConfigView::NetworkConfigView(CellularNetwork cellular)
flags_(FLAG_CELLULAR | FLAG_SHOW_IPCONFIG),
cellular_(cellular),
wificonfig_view_(NULL),
- ipconfig_view_(NULL) {
+ ipconfig_view_(NULL),
+ delegate_(NULL) {
}
NetworkConfigView::NetworkConfigView()
: browser_mode_(true),
flags_(FLAG_WIFI | FLAG_LOGIN_ONLY | FLAG_OTHER_NETWORK),
wificonfig_view_(NULL),
- ipconfig_view_(NULL) {
+ ipconfig_view_(NULL),
+ delegate_(NULL) {
}
gfx::NativeWindow NetworkConfigView::GetNativeWindow() const {
@@ -79,6 +83,8 @@ bool NetworkConfigView::IsDialogButtonEnabled(
}
bool NetworkConfigView::Cancel() {
+ if (delegate_)
+ delegate_->OnDialogCancelled();
return true;
}
diff --git a/chrome/browser/chromeos/options/network_config_view.h b/chrome/browser/chromeos/options/network_config_view.h
index 3b42abd..6a2653e 100644
--- a/chrome/browser/chromeos/options/network_config_view.h
+++ b/chrome/browser/chromeos/options/network_config_view.h
@@ -28,6 +28,14 @@ class NetworkConfigView : public views::View,
public views::DialogDelegate,
views::TabbedPane::Listener {
public:
+ class Delegate {
+ public:
+ // Called when dialog "Cancel" button is pressed.
+ virtual void OnDialogCancelled() = 0;
+ protected:
+ virtual ~Delegate() {}
+ };
+
// Configure dialog for ethernet.
explicit NetworkConfigView(EthernetNetwork ethernet);
// Configure dialog for wifi. If |login_only|, then only show login tab.
@@ -70,6 +78,10 @@ class NetworkConfigView : public views::View,
return browser_mode_;
}
+ void set_delegate(Delegate* delegate) {
+ delegate_ = delegate;
+ }
+
protected:
// views::View overrides:
virtual void Layout();
@@ -106,6 +118,8 @@ class NetworkConfigView : public views::View,
WifiConfigView* wificonfig_view_;
IPConfigView* ipconfig_view_;
+ Delegate* delegate_;
+
DISALLOW_COPY_AND_ASSIGN(NetworkConfigView);
};