| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views_network_screen_actor.h" | 5 #include "chrome/browser/chromeos/login/views_network_screen_actor.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string16.h" | 8 #include "base/string16.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 void ViewsNetworkScreenActor::SetDelegate(Delegate* screen) { | 54 void ViewsNetworkScreenActor::SetDelegate(Delegate* screen) { |
| 55 screen_ = screen; | 55 screen_ = screen; |
| 56 } | 56 } |
| 57 | 57 |
| 58 bool ViewsNetworkScreenActor::IsErrorShown() const { | 58 bool ViewsNetworkScreenActor::IsErrorShown() const { |
| 59 return bubble_ != NULL; | 59 return bubble_ != NULL; |
| 60 } | 60 } |
| 61 | 61 |
| 62 bool ViewsNetworkScreenActor::IsContinueEnabled() const { |
| 63 DCHECK(view()); |
| 64 if (view()) |
| 65 return view()->IsContinueEnabled(); |
| 66 return false; |
| 67 } |
| 68 |
| 69 bool ViewsNetworkScreenActor::IsConnecting() const { |
| 70 DCHECK(view()); |
| 71 if (view()) |
| 72 return view()->IsConnecting(); |
| 73 return false; |
| 74 } |
| 75 |
| 62 //////////////////////////////////////////////////////////////////////////////// | 76 //////////////////////////////////////////////////////////////////////////////// |
| 63 // ViewsNetworkScreenActor, NetworkScreenActor implementation: | 77 // ViewsNetworkScreenActor, NetworkScreenActor implementation: |
| 64 void ViewsNetworkScreenActor::PrepareToShow() { | 78 void ViewsNetworkScreenActor::PrepareToShow() { |
| 65 ViewScreen<NetworkSelectionView>::PrepareToShow(); | 79 ViewScreen<NetworkSelectionView>::PrepareToShow(); |
| 66 } | 80 } |
| 67 | 81 |
| 68 void ViewsNetworkScreenActor::Show() { | 82 void ViewsNetworkScreenActor::Show() { |
| 69 ViewScreen<NetworkSelectionView>::Show(); | 83 ViewScreen<NetworkSelectionView>::Show(); |
| 70 } | 84 } |
| 71 | 85 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 if (view()) | 121 if (view()) |
| 108 view()->ShowConnectingStatus(connecting, network_id); | 122 view()->ShowConnectingStatus(connecting, network_id); |
| 109 } | 123 } |
| 110 | 124 |
| 111 void ViewsNetworkScreenActor::EnableContinue(bool enabled) { | 125 void ViewsNetworkScreenActor::EnableContinue(bool enabled) { |
| 112 DCHECK(view()); | 126 DCHECK(view()); |
| 113 if (view()) | 127 if (view()) |
| 114 view()->EnableContinue(enabled); | 128 view()->EnableContinue(enabled); |
| 115 } | 129 } |
| 116 | 130 |
| 117 bool ViewsNetworkScreenActor::IsContinueEnabled() const { | |
| 118 DCHECK(view()); | |
| 119 if (view()) | |
| 120 return view()->IsContinueEnabled(); | |
| 121 return false; | |
| 122 } | |
| 123 | |
| 124 bool ViewsNetworkScreenActor::IsConnecting() const { | |
| 125 DCHECK(view()); | |
| 126 if (view()) | |
| 127 return view()->IsConnecting(); | |
| 128 return false; | |
| 129 } | |
| 130 | |
| 131 /////////////////////////////////////////////////////////////////////////////// | 131 /////////////////////////////////////////////////////////////////////////////// |
| 132 // views::ButtonListener implementation: | 132 // views::ButtonListener implementation: |
| 133 | 133 |
| 134 void ViewsNetworkScreenActor::ButtonPressed(views::Button* sender, | 134 void ViewsNetworkScreenActor::ButtonPressed(views::Button* sender, |
| 135 const views::Event& event) { | 135 const views::Event& event) { |
| 136 ClearErrors(); | 136 ClearErrors(); |
| 137 screen_->OnContinuePressed(); | 137 screen_->OnContinuePressed(); |
| 138 } | 138 } |
| 139 | 139 |
| 140 /////////////////////////////////////////////////////////////////////////////// | 140 /////////////////////////////////////////////////////////////////////////////// |
| (...skipping 26 matching lines...) Expand all Loading... |
| 167 void ViewsNetworkScreenActor::CreateView() { | 167 void ViewsNetworkScreenActor::CreateView() { |
| 168 language_switch_menu_.InitLanguageMenu(); | 168 language_switch_menu_.InitLanguageMenu(); |
| 169 ViewScreen<NetworkSelectionView>::CreateView(); | 169 ViewScreen<NetworkSelectionView>::CreateView(); |
| 170 } | 170 } |
| 171 | 171 |
| 172 NetworkSelectionView* ViewsNetworkScreenActor::AllocateView() { | 172 NetworkSelectionView* ViewsNetworkScreenActor::AllocateView() { |
| 173 return new NetworkSelectionView(this); | 173 return new NetworkSelectionView(this); |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace chromeos | 176 } // namespace chromeos |
| OLD | NEW |