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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

Issue 2836163002: mash: Shell ref clean up for screen lock (Closed)
Patch Set: rebase, fix compile Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/session/session_controller.cc ('k') | chrome/browser/chromeos/login/lock/webui_screen_locker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/lock/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
index f236f1e9ea25458fc5b3155913985ae5f170b0d2..fe1fd3b8b4592692f5a11946ef08292ee49b974f 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -38,6 +38,7 @@
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/signin/easy_unlock_service.h"
#include "chrome/browser/signin/signin_manager_factory.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/browser/ui/ash/session_controller_client.h"
#include "chrome/browser/ui/webui/chromeos/login/screenlock_icon_provider.h"
#include "chrome/browser/ui/webui/chromeos/login/screenlock_icon_source.h"
@@ -385,7 +386,7 @@ void ScreenLocker::OnStartLockCallback(bool locked) {
if (!locked)
return;
- web_ui()->OnLockAnimationFinished();
+ web_ui()->OnAshLockAnimationFinished();
AccessibilityManager::Get()->PlayEarcon(
chromeos::SOUND_LOCK, PlaySoundOption::SPOKEN_FEEDBACK_ENABLED);
@@ -473,15 +474,19 @@ void ScreenLocker::Show() {
return;
}
- // If the active window is fullscreen, exit fullscreen to avoid the web page
- // or app mimicking the lock screen. Do not exit fullscreen if the shelf is
- // visible while in fullscreen because the shelf makes it harder for a web
- // page or app to mimick the lock screen.
- ash::wm::WindowState* active_window_state = ash::wm::GetActiveWindowState();
- if (active_window_state && active_window_state->IsFullscreen() &&
- active_window_state->hide_shelf_when_fullscreen()) {
- const ash::wm::WMEvent event(ash::wm::WM_EVENT_TOGGLE_FULLSCREEN);
- active_window_state->OnWMEvent(&event);
+ // Manipulating active window state directly does not work in mash so skip it
+ // for mash. http://crbug.com/714677 tracks work to add the support for mash.
+ if (!ash_util::IsRunningInMash()) {
+ // If the active window is fullscreen, exit fullscreen to avoid the web page
+ // or app mimicking the lock screen. Do not exit fullscreen if the shelf is
+ // visible while in fullscreen because the shelf makes it harder for a web
+ // page or app to mimick the lock screen.
+ ash::wm::WindowState* active_window_state = ash::wm::GetActiveWindowState();
+ if (active_window_state && active_window_state->IsFullscreen() &&
+ active_window_state->hide_shelf_when_fullscreen()) {
+ const ash::wm::WMEvent event(ash::wm::WM_EVENT_TOGGLE_FULLSCREEN);
+ active_window_state->OnWMEvent(&event);
+ }
}
if (!screen_locker_) {
« no previous file with comments | « ash/session/session_controller.cc ('k') | chrome/browser/chromeos/login/lock/webui_screen_locker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698