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

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

Issue 7566016: Fullscreen support for Lion. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | 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 95517)
+++ chrome/browser/ui/browser.cc (working copy)
@@ -1634,6 +1634,13 @@
#endif
}
+#if defined(OS_MACOSX)
+void Browser::TogglePresentationMode() {
+ window_->SetPresentationMode(!window_->InPresentationMode());
+ WindowFullscreenStateChanged();
+}
+#endif
+
#if defined(OS_CHROMEOS)
void Browser::Search() {
// If the NTP is showing, close it.
@@ -2381,6 +2388,9 @@
case IDC_COPY_URL: WriteCurrentURLToClipboard(); break;
case IDC_SHOW_AS_TAB: ConvertPopupToTabbedBrowser(); break;
case IDC_FULLSCREEN: ToggleFullscreenMode(); break;
+#if defined(OS_MACOSX)
+ case IDC_PRESENTATION_MODE: TogglePresentationMode(); break;
+#endif
case IDC_EXIT: Exit(); break;
case IDC_TOGGLE_VERTICAL_TABS: ToggleUseVerticalTabs(); break;
case IDC_COMPACT_NAVBAR: ToggleUseCompactNavigationBar(); break;
@@ -3939,6 +3949,7 @@
command_updater_.UpdateCommandEnabled(IDC_HOME, normal_window);
// Window management commands
+ // TODO(rohitrao): Disable fullscreen on non-Lion?
command_updater_.UpdateCommandEnabled(IDC_FULLSCREEN,
!(is_type_panel() && is_app()));
command_updater_.UpdateCommandEnabled(IDC_SELECT_NEXT_TAB, normal_window);
@@ -3957,6 +3968,8 @@
command_updater_.UpdateCommandEnabled(IDC_SELECT_LAST_TAB, normal_window);
#if defined(OS_MACOSX)
command_updater_.UpdateCommandEnabled(IDC_TABPOSE, normal_window);
+ command_updater_.UpdateCommandEnabled(IDC_PRESENTATION_MODE,
+ !(is_type_panel() && is_app()));
#endif
// Clipboard commands
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698