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

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

Issue 1205063002: Fix user pod not always scroll to the center after VK shows up (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/core_oobe_actor.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/system/chromeos/power/power_event_observer.h" 8 #include "ash/system/chromeos/power/power_event_observer.h"
9 #include "ash/wm/lock_state_controller.h" 9 #include "ash/wm/lock_state_controller.h"
10 #include "ash/wm/lock_state_observer.h" 10 #include "ash/wm/lock_state_observer.h"
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 368 }
369 } 369 }
370 370
371 //////////////////////////////////////////////////////////////////////////////// 371 ////////////////////////////////////////////////////////////////////////////////
372 // keyboard::KeyboardControllerObserver: 372 // keyboard::KeyboardControllerObserver:
373 373
374 void WebUIScreenLocker::OnKeyboardBoundsChanging( 374 void WebUIScreenLocker::OnKeyboardBoundsChanging(
375 const gfx::Rect& new_bounds) { 375 const gfx::Rect& new_bounds) {
376 if (new_bounds.IsEmpty()) { 376 if (new_bounds.IsEmpty()) {
377 // Keyboard has been hidden. 377 // Keyboard has been hidden.
378 if (GetOobeUI()) { 378 if (GetOobeUI())
379 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true); 379 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(true);
380 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(false, new_bounds);
381 }
382 } else { 380 } else {
383 // Keyboard has been shown. 381 // Keyboard has been shown.
384 if (GetOobeUI()) { 382 if (GetOobeUI())
385 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); 383 GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false);
386 GetOobeUI()->GetCoreOobeActor()->SetKeyboardState(true, new_bounds);
387 }
388 } 384 }
389 } 385 }
390 386
391 //////////////////////////////////////////////////////////////////////////////// 387 ////////////////////////////////////////////////////////////////////////////////
392 // gfx::DisplayObserver: 388 // gfx::DisplayObserver:
393 389
394 void WebUIScreenLocker::OnDisplayAdded(const gfx::Display& new_display) { 390 void WebUIScreenLocker::OnDisplayAdded(const gfx::Display& new_display) {
395 } 391 }
396 392
397 void WebUIScreenLocker::OnDisplayRemoved(const gfx::Display& old_display) { 393 void WebUIScreenLocker::OnDisplayRemoved(const gfx::Display& old_display) {
398 } 394 }
399 395
400 void WebUIScreenLocker::OnDisplayMetricsChanged(const gfx::Display& display, 396 void WebUIScreenLocker::OnDisplayMetricsChanged(const gfx::Display& display,
401 uint32_t changed_metrics) { 397 uint32_t changed_metrics) {
402 gfx::Display primary_display = 398 gfx::Display primary_display =
403 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay(); 399 gfx::Screen::GetNativeScreen()->GetPrimaryDisplay();
404 if (display.id() != primary_display.id() || 400 if (display.id() != primary_display.id() ||
405 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) { 401 !(changed_metrics & DISPLAY_METRIC_BOUNDS)) {
406 return; 402 return;
407 } 403 }
408 404
409 if (GetOobeUI()) { 405 if (GetOobeUI()) {
410 const gfx::Size& size = primary_display.size(); 406 const gfx::Size& size = primary_display.size();
411 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(), 407 GetOobeUI()->GetCoreOobeActor()->SetClientAreaSize(size.width(),
412 size.height()); 408 size.height());
413 } 409 }
414 } 410 }
415 411
416 } // namespace chromeos 412 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screens/core_oobe_actor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698