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

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

Issue 8460003: [Mac] Fix a crash on calling ppapi mouse lock when fullscreen has permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4e9428fea59e4dcb3ce2141103c97ed2112d7443..0b299f3ba6c03a1b506a5de18f1855c35c03d9dd 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1773,22 +1773,15 @@ void Browser::NotifyTabOfFullscreenExitIfNecessary() {
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;
- }
- 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 {
- window_->ExitPresentationMode();
+ tab_fullscreen_accepted_ = entering_fullscreen &&
+ GetFullscreenSetting(url) == CONTENT_SETTING_ALLOW;
}
+ 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