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

Unified Diff: chrome/browser/ui/exclusive_access/mouse_lock_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
Index: chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
diff --git a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
index c249e7854b477b1135d584d7b122f09d5f15c4c1..073e5187f2154d0cbfbe0d9a987e4525ae98aada 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
@@ -243,29 +243,11 @@ void MouseLockController::UnlockMouse() {
}
ContentSetting MouseLockController::GetMouseLockSetting(const GURL& url) const {
- // If simplified UI is enabled, never ask the user, just auto-allow. We no
+ // The new policy is to always allow (even if the flag is disabled). We no
// longer give users control over this at the settings level (since it is very
// easy to escape mouse lock when it happens). Even if the user has blocked
// access to this site in the past, we now ignore that setting.
- if (ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled())
- return CONTENT_SETTING_ALLOW;
-
- // 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 (exclusive_access_manager()
- ->fullscreen_controller()
- ->IsPrivilegedFullscreenForTab())
- return CONTENT_SETTING_ALLOW;
-
- HostContentSettingsMap* settings_map =
- HostContentSettingsMapFactory::GetForProfile(
- exclusive_access_manager()->context()->GetProfile());
- ContentSetting setting = settings_map->GetContentSetting(
- url, url, CONTENT_SETTINGS_TYPE_MOUSELOCK, std::string());
-
- return setting;
+ // TODO(mgiuca): Remove this function and clean up callers
+ // (https://crbug.com/610900).
+ return CONTENT_SETTING_ALLOW;
}

Powered by Google App Engine
This is Rietveld 408576698