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

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

Issue 8598027: Handle mouselock allowed in content settings while fullscreen is not. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to tip of tree; code moved from browser.cc to fullscreen_controller.cc Created 9 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/fullscreen_controller.cc
diff --git a/chrome/browser/ui/fullscreen_controller.cc b/chrome/browser/ui/fullscreen_controller.cc
index 06747586826d9c6ac49f001a2e23ad34bf114b16..4a90b84ca679ee33d7dcc764fafcea23107f114b 100644
--- a/chrome/browser/ui/fullscreen_controller.cc
+++ b/chrome/browser/ui/fullscreen_controller.cc
@@ -58,8 +58,12 @@ void FullscreenController::RequestToLockMouse(TabContents* tab) {
switch (GetMouseLockSetting(tab->GetURL())) {
case CONTENT_SETTING_ALLOW:
- mouse_lock_state_ = MOUSELOCK_ACCEPTED;
- tab->GotResponseToLockMouseRequest(true);
+ if (tab_fullscreen_accepted_) {
+ mouse_lock_state_ = MOUSELOCK_ACCEPTED;
+ tab->GotResponseToLockMouseRequest(true);
+ } else {
+ mouse_lock_state_ = MOUSELOCK_REQUESTED;
+ }
break;
case CONTENT_SETTING_BLOCK:
mouse_lock_state_ = MOUSELOCK_NOT_REQUESTED;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698