OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/webui_login_view.h" | 5 #include "chrome/browser/chromeos/login/ui/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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
341 tray->SetVisible(visible); | 341 tray->SetVisible(visible); |
342 tray->GetWidget()->Show(); | 342 tray->GetWidget()->Show(); |
343 } else { | 343 } else { |
344 tray->GetWidget()->Hide(); | 344 tray->GetWidget()->Hide(); |
345 } | 345 } |
346 } | 346 } |
347 } | 347 } |
348 | 348 |
349 void WebUILoginView::SetUIEnabled(bool enabled) { | 349 void WebUILoginView::SetUIEnabled(bool enabled) { |
350 forward_keyboard_event_ = enabled; | 350 forward_keyboard_event_ = enabled; |
351 ash::Shell::GetInstance()->GetPrimarySystemTray()->SetEnabled(enabled); | 351 ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray(); |
352 if (!enabled && tray->HasSystemBubble()) | |
achuithb
2015/06/19 23:52:06
Could you please add a comment here summarizing wh
| |
353 tray->CloseSystemBubble(); | |
354 tray->SetEnabled(enabled); | |
352 } | 355 } |
353 | 356 |
354 void WebUILoginView::AddFrameObserver(FrameObserver* frame_observer) { | 357 void WebUILoginView::AddFrameObserver(FrameObserver* frame_observer) { |
355 DCHECK(frame_observer); | 358 DCHECK(frame_observer); |
356 DCHECK(!frame_observer_list_.HasObserver(frame_observer)); | 359 DCHECK(!frame_observer_list_.HasObserver(frame_observer)); |
357 frame_observer_list_.AddObserver(frame_observer); | 360 frame_observer_list_.AddObserver(frame_observer); |
358 } | 361 } |
359 | 362 |
360 void WebUILoginView::RemoveFrameObserver(FrameObserver* frame_observer) { | 363 void WebUILoginView::RemoveFrameObserver(FrameObserver* frame_observer) { |
361 DCHECK(frame_observer); | 364 DCHECK(frame_observer); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
514 webui_visible_ = true; | 517 webui_visible_ = true; |
515 } | 518 } |
516 | 519 |
517 void WebUILoginView::ReturnFocus(bool reverse) { | 520 void WebUILoginView::ReturnFocus(bool reverse) { |
518 // Return the focus to the web contents. | 521 // Return the focus to the web contents. |
519 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); | 522 webui_login_->web_contents()->FocusThroughTabTraversal(reverse); |
520 GetWidget()->Activate(); | 523 GetWidget()->Activate(); |
521 } | 524 } |
522 | 525 |
523 } // namespace chromeos | 526 } // namespace chromeos |
OLD | NEW |