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

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

Issue 2368343002: Revert auto-hide-invisible mode for ARC++ (Closed)
Patch Set: Revert "Use MD-ash's auto hide behavior for arc++ windows." Created 4 years, 2 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
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/screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/wallpaper/wallpaper_controller.h" 10 #include "ash/common/wallpaper/wallpaper_controller.h"
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) { 423 if (user_manager::UserManager::Get()->IsLoggedInAsGuest()) {
424 VLOG(1) << "Refusing to lock screen for guest account"; 424 VLOG(1) << "Refusing to lock screen for guest account";
425 return; 425 return;
426 } 426 }
427 427
428 // If the active window is fullscreen, exit fullscreen to avoid the web page 428 // If the active window is fullscreen, exit fullscreen to avoid the web page
429 // or app mimicking the lock screen. Do not exit fullscreen if the shelf is 429 // or app mimicking the lock screen. Do not exit fullscreen if the shelf is
430 // visible while in fullscreen because the shelf makes it harder for a web 430 // visible while in fullscreen because the shelf makes it harder for a web
431 // page or app to mimick the lock screen. 431 // page or app to mimick the lock screen.
432 ash::wm::WindowState* active_window_state = ash::wm::GetActiveWindowState(); 432 ash::wm::WindowState* active_window_state = ash::wm::GetActiveWindowState();
433
434 if (active_window_state && active_window_state->IsFullscreen() && 433 if (active_window_state && active_window_state->IsFullscreen() &&
435 active_window_state->shelf_mode_in_fullscreen() != 434 active_window_state->hide_shelf_when_fullscreen()) {
436 ash::wm::WindowState::SHELF_AUTO_HIDE_VISIBLE) {
437 const ash::wm::WMEvent event(ash::wm::WM_EVENT_TOGGLE_FULLSCREEN); 435 const ash::wm::WMEvent event(ash::wm::WM_EVENT_TOGGLE_FULLSCREEN);
438 active_window_state->OnWMEvent(&event); 436 active_window_state->OnWMEvent(&event);
439 } 437 }
440 438
441 if (!screen_locker_) { 439 if (!screen_locker_) {
442 ScreenLocker* locker = 440 ScreenLocker* locker =
443 new ScreenLocker(user_manager::UserManager::Get()->GetUnlockUsers()); 441 new ScreenLocker(user_manager::UserManager::Get()->GetUnlockUsers());
444 VLOG(1) << "Created ScreenLocker " << locker; 442 VLOG(1) << "Created ScreenLocker " << locker;
445 locker->Init(); 443 locker->Init();
446 } else { 444 } else {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 543
546 bool ScreenLocker::IsUserLoggedIn(const AccountId& account_id) const { 544 bool ScreenLocker::IsUserLoggedIn(const AccountId& account_id) const {
547 for (user_manager::User* user : users_) { 545 for (user_manager::User* user : users_) {
548 if (user->GetAccountId() == account_id) 546 if (user->GetAccountId() == account_id)
549 return true; 547 return true;
550 } 548 }
551 return false; 549 return false;
552 } 550 }
553 551
554 } // namespace chromeos 552 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698