Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1194)

Side by Side Diff: chrome/browser/chromeos/login/lock/webui_screen_locker.cc

Issue 371923002: cros: Fixes the text input focus when screen is locked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed to use WidgetDelegate::GetInitiallyFocusedView. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/lock_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/ui/lock_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698