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

Unified Diff: chrome/browser/browser.cc

Issue 244003: Kiosk Mode implementation (Closed)
Patch Set: Finally fix MACOSX Created 11 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 | « chrome/browser/browser.h ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 30a7a01bdc44c9f8084b202656ac8994d3f3b135..27e14232790266c45534d8396fef54cf7c8b7a60 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -921,6 +921,14 @@ void Browser::ConvertPopupToTabbedBrowser() {
}
void Browser::ToggleFullscreenMode() {
+#if !defined(OS_MACOSX)
+ // In kiosk mode, we always want to be fullscreen. When the browser first
+ // starts we're not yet fullscreen, so let the initial toggle go through.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode) &&
+ window_->IsFullscreen())
+ return;
+#endif
+
UserMetrics::RecordAction(L"ToggleFullscreen", profile_);
window_->SetFullscreen(!window_->IsFullscreen());
// On Linux, setting fullscreen mode is an async call to the X server, which
@@ -2644,6 +2652,11 @@ void Browser::RemoveScheduledUpdatesFor(TabContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
+#if !defined(OS_MACOSX)
+ // In kiosk mode, we want to always hide the status bubble.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode))
+ return NULL;
+#endif
return window_ ? window_->GetStatusBubble() : NULL;
}
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698