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

Unified Diff: chrome/browser/ui/fullscreen/fullscreen_controller.cc

Issue 22986010: Add policy for fullscreen mode; disallow fullscreen in public sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add an explanation of fullscreen mode. Created 7 years, 4 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
Index: chrome/browser/ui/fullscreen/fullscreen_controller.cc
diff --git a/chrome/browser/ui/fullscreen/fullscreen_controller.cc b/chrome/browser/ui/fullscreen/fullscreen_controller.cc
index 7c1621e0a32673e73d50ff51c71ef71a61af55d4..7fc8da75b87b3d97e7d38003e5a08726a5a97f4e 100644
--- a/chrome/browser/ui/fullscreen/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen/fullscreen_controller.cc
@@ -28,6 +28,9 @@
#if defined(OS_MACOSX)
#include "base/mac/mac_util.h"
+#else
+#include "base/prefs/pref_service.h"
+#include "chrome/common/pref_names.h"
#endif
using content::RenderViewHost;
@@ -552,6 +555,14 @@ void FullscreenController::ToggleFullscreenModeInternal(
if (chrome::IsRunningInAppMode() && window_->IsFullscreen())
return;
+#if !defined(OS_MACOSX)
+ // Do not enter fullscreen mode if disallowed by pref.
scheib 2013/08/22 23:57:26 Have you tested this in combination with kiosk mod
bartfab (slow) 2013/08/23 11:54:21 Added documentation here, in pref_names.cc and pol
+ if (enter_fullscreen &&
+ !profile_->GetPrefs()->GetBoolean(prefs::kFullscreenAllowed)) {
+ return;
+ }
+#endif
+
if (enter_fullscreen)
EnterFullscreenModeInternal(option);
else

Powered by Google App Engine
This is Rietveld 408576698