| OLD | NEW |
| 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/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/webui_login_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/tray/system_tray.h" | 8 #include "ash/system/tray/system_tray.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 dialog->Show(); | 227 dialog->Show(); |
| 228 } | 228 } |
| 229 | 229 |
| 230 void WebUILoginView::SetStatusAreaEnabled(bool enable) { | 230 void WebUILoginView::SetStatusAreaEnabled(bool enable) { |
| 231 if (status_area_) | 231 if (status_area_) |
| 232 status_area_->MakeButtonsActive(enable); | 232 status_area_->MakeButtonsActive(enable); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void WebUILoginView::SetStatusAreaVisible(bool visible) { | 235 void WebUILoginView::SetStatusAreaVisible(bool visible) { |
| 236 ash::SystemTray* tray = ash::Shell::GetInstance()->tray(); | 236 ash::SystemTray* tray = ash::Shell::GetInstance()->tray(); |
| 237 if (tray) | 237 if (tray) { |
| 238 tray->SetVisible(visible); | 238 if (visible) |
| 239 tray->GetWidget()->Show(); |
| 240 else |
| 241 tray->GetWidget()->Hide(); |
| 242 } |
| 239 if (status_area_) | 243 if (status_area_) |
| 240 status_area_->SetVisible(visible); | 244 status_area_->SetVisible(visible); |
| 241 else | 245 else |
| 242 status_area_visibility_on_init_ = visible; | 246 status_area_visibility_on_init_ = visible; |
| 243 } | 247 } |
| 244 | 248 |
| 245 // WebUILoginView protected: --------------------------------------------------- | 249 // WebUILoginView protected: --------------------------------------------------- |
| 246 | 250 |
| 247 void WebUILoginView::Layout() { | 251 void WebUILoginView::Layout() { |
| 248 DCHECK(webui_login_); | 252 DCHECK(webui_login_); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 428 } |
| 425 | 429 |
| 426 void WebUILoginView::ReturnFocus(bool reverse) { | 430 void WebUILoginView::ReturnFocus(bool reverse) { |
| 427 // Return the focus to the web contents. | 431 // Return the focus to the web contents. |
| 428 webui_login_->dom_contents()->web_contents()-> | 432 webui_login_->dom_contents()->web_contents()-> |
| 429 FocusThroughTabTraversal(reverse); | 433 FocusThroughTabTraversal(reverse); |
| 430 GetWidget()->Activate(); | 434 GetWidget()->Activate(); |
| 431 } | 435 } |
| 432 | 436 |
| 433 } // namespace chromeos | 437 } // namespace chromeos |
| OLD | NEW |