| 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/lock/webui_screen_locker.h" | 5 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/lock_state_controller.h" | 8 #include "ash/wm/lock_state_controller.h" |
| 9 #include "ash/wm/lock_state_observer.h" | 9 #include "ash/wm/lock_state_observer.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); | 80 ash::Shell::GetInstance()->delegate()->AddVirtualKeyboardStateObserver(this); |
| 81 } | 81 } |
| 82 | 82 |
| 83 void WebUIScreenLocker::LockScreen() { | 83 void WebUIScreenLocker::LockScreen() { |
| 84 gfx::Rect bounds(ash::Shell::GetScreen()->GetPrimaryDisplay().bounds()); | 84 gfx::Rect bounds(ash::Shell::GetScreen()->GetPrimaryDisplay().bounds()); |
| 85 | 85 |
| 86 lock_time_ = base::TimeTicks::Now(); | 86 lock_time_ = base::TimeTicks::Now(); |
| 87 LockWindow* lock_window = LockWindow::Create(); | 87 LockWindow* lock_window = LockWindow::Create(); |
| 88 lock_window->set_observer(this); | 88 lock_window->set_observer(this); |
| 89 lock_window->set_initially_focused_view(this); |
| 89 lock_window_ = lock_window->GetWidget(); | 90 lock_window_ = lock_window->GetWidget(); |
| 90 lock_window_->AddObserver(this); | 91 lock_window_->AddObserver(this); |
| 91 WebUILoginView::Init(); | 92 WebUILoginView::Init(); |
| 92 lock_window_->SetContentsView(this); | 93 lock_window_->SetContentsView(this); |
| 93 lock_window_->Show(); | 94 lock_window_->Show(); |
| 94 LoadURL(GURL(kLoginURL)); | 95 LoadURL(GURL(kLoginURL)); |
| 95 lock_window->Grab(); | 96 lock_window->Grab(); |
| 96 | 97 |
| 97 login_display_.reset(new WebUILoginDisplay(this)); | 98 login_display_.reset(new WebUILoginDisplay(this)); |
| 98 login_display_->set_background_bounds(bounds); | 99 login_display_->set_background_bounds(bounds); |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); | 379 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); |
| 379 if (login::LoginScrollIntoViewEnabled()) | 380 if (login::LoginScrollIntoViewEnabled()) |
| 380 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true, new_bounds); | 381 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true, new_bounds); |
| 381 } | 382 } |
| 382 } | 383 } |
| 383 | 384 |
| 384 keyboard_bounds_ = new_bounds; | 385 keyboard_bounds_ = new_bounds; |
| 385 } | 386 } |
| 386 | 387 |
| 387 } // namespace chromeos | 388 } // namespace chromeos |
| OLD | NEW |