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

Side by Side Diff: chrome/browser/chromeos/login/screens/network_screen.cc

Issue 647043004: WizardScreen is merged to BaseScreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
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 #include "chrome/browser/chromeos/login/screens/network_screen.h" 5 #include "chrome/browser/chromeos/login/screens/network_screen.h"
6 6
7 #include "base/location.h" 7 #include "base/location.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 22 matching lines...) Expand all
33 // NetworkScreen, public: 33 // NetworkScreen, public:
34 34
35 // static 35 // static
36 NetworkScreen* NetworkScreen::Get(ScreenManager* manager) { 36 NetworkScreen* NetworkScreen::Get(ScreenManager* manager) {
37 return static_cast<NetworkScreen*>( 37 return static_cast<NetworkScreen*>(
38 manager->GetScreen(WizardController::kNetworkScreenName)); 38 manager->GetScreen(WizardController::kNetworkScreenName));
39 } 39 }
40 40
41 NetworkScreen::NetworkScreen(ScreenObserver* screen_observer, 41 NetworkScreen::NetworkScreen(ScreenObserver* screen_observer,
42 NetworkScreenActor* actor) 42 NetworkScreenActor* actor)
43 : WizardScreen(screen_observer), 43 : BaseScreen(screen_observer),
44 is_network_subscribed_(false), 44 is_network_subscribed_(false),
45 continue_pressed_(false), 45 continue_pressed_(false),
46 actor_(actor), 46 actor_(actor),
47 network_state_helper_(new login::NetworkStateHelper) { 47 network_state_helper_(new login::NetworkStateHelper) {
48 DCHECK(actor_); 48 DCHECK(actor_);
49 if (actor_) 49 if (actor_)
50 actor_->SetDelegate(this); 50 actor_->SetDelegate(this);
51 } 51 }
52 52
53 NetworkScreen::~NetworkScreen() { 53 NetworkScreen::~NetworkScreen() {
54 if (actor_) 54 if (actor_)
55 actor_->SetDelegate(NULL); 55 actor_->SetDelegate(NULL);
56 connection_timer_.Stop(); 56 connection_timer_.Stop();
57 UnsubscribeNetworkNotification(); 57 UnsubscribeNetworkNotification();
58 } 58 }
59 59
60 //////////////////////////////////////////////////////////////////////////////// 60 ////////////////////////////////////////////////////////////////////////////////
61 // NetworkScreen, WizardScreen implementation: 61 // NetworkScreen, BaseScreen implementation:
62 62
63 void NetworkScreen::PrepareToShow() { 63 void NetworkScreen::PrepareToShow() {
64 if (actor_) 64 if (actor_)
65 actor_->PrepareToShow(); 65 actor_->PrepareToShow();
66 } 66 }
67 67
68 void NetworkScreen::Show() { 68 void NetworkScreen::Show() {
69 Refresh(); 69 Refresh();
70 if (actor_) 70 if (actor_)
71 actor_->Show(); 71 actor_->Show();
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 } 204 }
205 205
206 network_id_ = network_id; 206 network_id_ = network_id;
207 if (actor_) { 207 if (actor_) {
208 actor_->ShowConnectingStatus(continue_pressed_, network_id_); 208 actor_->ShowConnectingStatus(continue_pressed_, network_id_);
209 actor_->EnableContinue(false); 209 actor_->EnableContinue(false);
210 } 210 }
211 } 211 }
212 212
213 } // namespace chromeos 213 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698