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_screen_locker.h" | 5 #include "chrome/browser/chromeos/login/webui_screen_locker.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/chromeos/cros/cros_library.h" | 10 #include "chrome/browser/chromeos/cros/cros_library.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 // WebUIScreenLocker implementation. | 37 // WebUIScreenLocker implementation. |
38 | 38 |
39 WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker) | 39 WebUIScreenLocker::WebUIScreenLocker(ScreenLocker* screen_locker) |
40 : ScreenLockerDelegate(screen_locker), | 40 : ScreenLockerDelegate(screen_locker), |
41 lock_ready_(false), | 41 lock_ready_(false), |
42 webui_ready_(false) { | 42 webui_ready_(false) { |
43 set_should_emit_login_prompt_visible(false); | 43 set_should_emit_login_prompt_visible(false); |
44 } | 44 } |
45 | 45 |
46 void WebUIScreenLocker::LockScreen(bool unlock_on_input) { | 46 void WebUIScreenLocker::LockScreen(bool unlock_on_input) { |
47 gfx::Rect bounds(gfx::Screen::GetMonitorAreaNearestWindow(NULL)); | 47 gfx::Rect bounds(gfx::Screen::GetPrimaryMonitor().bounds()); |
48 | 48 |
49 LockWindow* lock_window = LockWindow::Create(); | 49 LockWindow* lock_window = LockWindow::Create(); |
50 lock_window->set_observer(this); | 50 lock_window->set_observer(this); |
51 lock_window_ = lock_window->GetWidget(); | 51 lock_window_ = lock_window->GetWidget(); |
52 WebUILoginView::Init(lock_window_); | 52 WebUILoginView::Init(lock_window_); |
53 lock_window_->SetContentsView(this); | 53 lock_window_->SetContentsView(this); |
54 lock_window_->Show(); | 54 lock_window_->Show(); |
55 OnWindowCreated(); | 55 OnWindowCreated(); |
56 LoadURL(GURL(kLoginURL)); | 56 LoadURL(GURL(kLoginURL)); |
57 lock_window->Grab(); | 57 lock_window->Grab(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 //////////////////////////////////////////////////////////////////////////////// | 184 //////////////////////////////////////////////////////////////////////////////// |
185 // LockWindow::Observer implementation: | 185 // LockWindow::Observer implementation: |
186 | 186 |
187 void WebUIScreenLocker::OnLockWindowReady() { | 187 void WebUIScreenLocker::OnLockWindowReady() { |
188 lock_ready_ = true; | 188 lock_ready_ = true; |
189 if (webui_ready_) | 189 if (webui_ready_) |
190 ScreenLockReady(); | 190 ScreenLockReady(); |
191 } | 191 } |
192 | 192 |
193 } // namespace chromeos | 193 } // namespace chromeos |
OLD | NEW |