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

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

Issue 2832063: Exit Fullscreen when screen is locked (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: minor change to fix edge case. Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index cce18f4f9da03d9e16bb2bb6357c89b819f34340..59ae1f8e2d10bf38d8cc56f616df2ffc690ce509 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -13,7 +13,9 @@
#include "base/singleton.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/browser.h"
#include "chrome/browser/browser_list.h"
+#include "chrome/browser/browser_window.h"
#include "chrome/browser/chromeos/cros/input_method_library.h"
#include "chrome/browser/chromeos/cros/screen_lock_library.h"
#include "chrome/browser/chromeos/language_preferences.h"
@@ -580,6 +582,14 @@ void ScreenLocker::OnGrabInputs() {
// static
void ScreenLocker::Show() {
DCHECK(MessageLoop::current()->type() == MessageLoop::TYPE_UI);
+
+ // Exit fullscreen.
+ Browser* browser = BrowserList::GetLastActive();
+ DCHECK(browser);
+ if (browser->window()->IsFullscreen()) {
+ browser->ToggleFullscreenMode();
+ }
+
// TODO(oshima): Currently, PowerManager may send a lock screen event
// even if a screen is locked. Investigate & solve the issue and
// enable this again if it's possible.
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698