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

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

Issue 8494022: Merge 108823 - [Mac] Fix a crash on calling ppapi mouse lock when fullscreen has permission (Closed) Base URL: svn://svn.chromium.org/chrome/branches/912/src/
Patch Set: 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/browser.cc
===================================================================
--- chrome/browser/ui/browser.cc (revision 108933)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -1711,22 +1711,15 @@
void Browser::TogglePresentationMode(bool for_tab) {
bool entering_fullscreen = !window_->InPresentationMode();
GURL url;
- bool ask_permission = false;
if (for_tab) {
url = GetSelectedTabContents()->GetURL();
- ask_permission = GetFullscreenSetting(url) != CONTENT_SETTING_ALLOW;
+ tab_fullscreen_accepted_ = entering_fullscreen &&
+ GetFullscreenSetting(url) == CONTENT_SETTING_ALLOW;
}
- if (entering_fullscreen) {
- FullscreenExitBubbleType type =
- FEB_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION;
- if (for_tab) {
- type = ask_permission ? FEB_TYPE_FULLSCREEN_BUTTONS :
- FEB_TYPE_FULLSCREEN_EXIT_INSTRUCTION;
- }
- window_->EnterPresentationMode(url, type);
- } else {
+ if (entering_fullscreen)
+ window_->EnterPresentationMode(url, GetFullscreenExitBubbleType());
+ else
window_->ExitPresentationMode();
- }
WindowFullscreenStateChanged();
}
#endif
« 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