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

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

Issue 1964383002: Fullscreen / mouselock: Always auto-accept (even if flag disabled). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove setting from OIB. Created 4 years, 7 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/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/exclusive_access/fullscreen_controller.cc
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index de79134977593ce3e183ed754f206c01f02d1534..17d76c952041b13388efd35ddafcccb2d0ed110a 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -477,41 +477,10 @@ void FullscreenController::ExitFullscreenModeInternal() {
}
ContentSetting FullscreenController::GetFullscreenSetting() const {
- DCHECK(exclusive_access_tab());
-
- // If simplified UI is enabled, never ask the user, just auto-allow.
- // TODO(mgiuca): Should we allow the user to block use of fullscreen?
- // http://crbug.com/515747.
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
- return CONTENT_SETTING_ALLOW;
-
- GURL url = GetRequestingOrigin();
-
- // Always ask on file:// URLs, since we can't meaningfully make the
- // decision stick for a particular origin.
- // TODO(estark): Revisit this when crbug.com/455882 is fixed.
- if (url.SchemeIsFile())
- return CONTENT_SETTING_ASK;
-
- if (IsPrivilegedFullscreenForTab())
- return CONTENT_SETTING_ALLOW;
-
- // If the permission was granted to the website with no embedder, it should
- // always be allowed, even if embedded.
- if (HostContentSettingsMapFactory::GetForProfile(
- exclusive_access_manager()->context()->GetProfile())
- ->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_FULLSCREEN,
- std::string()) == CONTENT_SETTING_ALLOW) {
- return CONTENT_SETTING_ALLOW;
- }
-
- // See the comment above the call to |SetContentSettingDefaultScope()| for how
- // the requesting and embedding origins interact with each other wrt
- // permissions.
- return HostContentSettingsMapFactory::GetForProfile(
- exclusive_access_manager()->context()->GetProfile())
- ->GetContentSetting(url, GetEmbeddingOrigin(),
- CONTENT_SETTINGS_TYPE_FULLSCREEN, std::string());
+ // The new policy is to always allow (even if the flag is disabled).
+ // TODO(mgiuca): Remove this function and clean up callers
+ // (https://crbug.com/610900).
+ return CONTENT_SETTING_ALLOW;
}
bool FullscreenController::IsPrivilegedFullscreenForTab() const {
« no previous file with comments | « no previous file | chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698