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

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

Issue 1252503007: Added flag simplified-fullscreen-ui. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added link to discussion bug 515747. Created 5 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 | « chrome/browser/ui/exclusive_access/fullscreen_controller.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8e3afb90779a4eaadb33e7288f7a4f70f62427d8..f6adfac00fb2e7cbcf7041974ed2571c985034e8 100644
--- a/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
+++ b/chrome/browser/ui/exclusive_access/mouse_lock_controller.cc
@@ -229,10 +229,15 @@ void MouseLockController::UnlockMouse() {
}
ContentSetting MouseLockController::GetMouseLockSetting(const GURL& url) const {
+ // If simplified UI is enabled, never ask the user, just auto-allow. (Always
+ // return CONTENT_SETTING_ALLOW in favour of CONTENT_SETTING_ASK.)
+ bool simplified_ui =
+ ExclusiveAccessManager::IsSimplifiedFullscreenUIEnabled();
+
// 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())
+ if (url.SchemeIsFile() && !simplified_ui)
return CONTENT_SETTING_ASK;
if (exclusive_access_manager()
@@ -244,6 +249,11 @@ ContentSetting MouseLockController::GetMouseLockSetting(const GURL& url) const {
->context()
->GetProfile()
->GetHostContentSettingsMap();
- return settings_map->GetContentSetting(
+ ContentSetting setting = settings_map->GetContentSetting(
url, url, CONTENT_SETTINGS_TYPE_MOUSELOCK, std::string());
+
+ if (simplified_ui && setting == CONTENT_SETTING_ASK)
+ return CONTENT_SETTING_ALLOW;
+
+ return setting;
}
« no previous file with comments | « chrome/browser/ui/exclusive_access/fullscreen_controller.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698