diff options
author | spqchan <spqchan@chromium.org> | 2016-02-04 16:59:18 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-05 01:00:37 +0000 |
commit | cae22576c51838b5c32a2d489e8c6187dc3c451f (patch) | |
tree | 5c3b91c77d54cb50a4c9bfe8686799e0de7f1673 | |
parent | 03b7a204fceb8948d84e36e66b26b9a447a2f51f (diff) | |
download | chromium_src-cae22576c51838b5c32a2d489e8c6187dc3c451f.zip chromium_src-cae22576c51838b5c32a2d489e8c6187dc3c451f.tar.gz chromium_src-cae22576c51838b5c32a2d489e8c6187dc3c451f.tar.bz2 |
Preference for Presentation Mode/Fullscreen Toolbar
Fixes the issue with the test on 10.10 for the commit: https://chromium.googlesource.com/chromium/src/+/048c293643242dc0357c8bc8651d1c251559a400
BUG=544307
Review URL: https://codereview.chromium.org/1650713003
Cr-Commit-Position: refs/heads/master@{#373695}
14 files changed, 121 insertions, 36 deletions
diff --git a/chrome/app/nibs/MainMenu.xib b/chrome/app/nibs/MainMenu.xib index b4712f5..b66bab7 100644 --- a/chrome/app/nibs/MainMenu.xib +++ b/chrome/app/nibs/MainMenu.xib @@ -319,7 +319,7 @@ CA <action selector="commandDispatch:" target="-1" id="531"/> </connections> </menuItem> - <menuItem title="^IDS_TOGGLE_FULLSCREEN_TOOLBAR_MAC" tag="34039" keyEquivalent="F" id="70p-NK-bpU"> + <menuItem title="^IDS_TOGGLE_FULLSCREEN_TOOLBAR_MAC" tag="40251" keyEquivalent="F" id="70p-NK-bpU"> <connections> <action selector="commandDispatch:" target="-1" id="0A7-Iy-65Q"/> </connections> diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc index bf0047a..94b8791 100644 --- a/chrome/browser/ui/browser_ui_prefs.cc +++ b/chrome/browser/ui/browser_ui_prefs.cc @@ -37,17 +37,6 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { prefs::kShowHomeButton, false, user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); -#if defined(OS_MACOSX) - // This really belongs in platform code, but there's no good place to - // initialize it between the time when the AppController is created - // (where there's no profile) and the time the controller gets another - // crack at the start of the main event loop. By that time, - // StartupBrowserCreator has already created the browser window, and it's too - // late: we need the pref to be already initialized. Doing it here also saves - // us from having to hard-code pref registration in the several unit tests - // that use this preference. - registry->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true); -#endif registry->RegisterBooleanPref( prefs::kDeleteBrowsingHistory, true, @@ -135,7 +124,21 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) { registry->RegisterBooleanPref(prefs::kPluginsAlwaysAuthorize, false); registry->RegisterBooleanPref(prefs::kClearPluginLSODataEnabled, true); registry->RegisterBooleanPref(prefs::kHideWebStoreIcon, false); -#if !defined(OS_MACOSX) +#if defined(OS_MACOSX) + // This really belongs in platform code, but there's no good place to + // initialize it between the time when the AppController is created + // (where there's no profile) and the time the controller gets another + // crack at the start of the main event loop. By that time, + // StartupBrowserCreator has already created the browser window, and it's too + // late: we need the pref to be already initialized. Doing it here also saves + // us from having to hard-code pref registration in the several unit tests + // that use this preference. + registry->RegisterBooleanPref(prefs::kShowUpdatePromotionInfoBar, true); + registry->RegisterBooleanPref( + prefs::kHideFullscreenToolbar, + false, + user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); +#else registry->RegisterBooleanPref(prefs::kFullscreenAllowed, true); #endif } diff --git a/chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm b/chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm index dff475c..9191a67 100644 --- a/chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm +++ b/chrome/browser/ui/cocoa/accelerators_cocoa_browsertest.mm @@ -5,6 +5,7 @@ #import <Cocoa/Cocoa.h> #include "base/logging.h" +#include "chrome/app/chrome_command_ids.h" #import "chrome/browser/ui/cocoa/accelerators_cocoa.h" #include "chrome/test/base/in_process_browser_test.h" #include "testing/gtest_mac.h" @@ -127,7 +128,10 @@ IN_PROC_BROWSER_TEST_F(AcceleratorsCocoaBrowserTest, EXPECT_TRUE(item); // If the menu uses a commandDispatch:, the tag must match the command id! - if (item.action == @selector(commandDispatch:)) + // Added an exception for IDC_TOGGLE_FULLSCREEN_TOOLBAR, which conflicts + // with IDC_PRESENTATION_MODE. + if (item.action == @selector(commandDispatch:) + && item.tag != IDC_TOGGLE_FULLSCREEN_TOOLBAR) EXPECT_EQ(item.tag, it->first); } } diff --git a/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm b/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm index 7026b32..e2a8ed0 100644 --- a/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm +++ b/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm @@ -13,6 +13,8 @@ #include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h" #include "chrome/browser/ui/status_bubble.h" #include "chrome/browser/ui/views/exclusive_access_bubble_views.h" +#include "chrome/common/pref_names.h" +#include "components/prefs/pref_service.h" #import "ui/gfx/mac/coordinate_conversion.h" ExclusiveAccessController::ExclusiveAccessController( @@ -72,7 +74,10 @@ void ExclusiveAccessController::UpdateFullscreenWithToolbar(bool with_toolbar) { } void ExclusiveAccessController::ToggleFullscreenToolbar() { - [controller_ toggleFullscreenToolbar]; + PrefService* prefs = browser_->profile()->GetPrefs(); + bool hideToolbar = !prefs->GetBoolean(prefs::kHideFullscreenToolbar); + [controller_ setFullscreenToolbarHidden:hideToolbar]; + prefs->SetBoolean(prefs::kHideFullscreenToolbar, hideToolbar); } bool ExclusiveAccessController::IsFullscreenWithToolbar() const { diff --git a/chrome/browser/ui/cocoa/browser_window_command_handler.mm b/chrome/browser/ui/cocoa/browser_window_command_handler.mm index 8697e32..4f88b46e4 100644 --- a/chrome/browser/ui/cocoa/browser_window_command_handler.mm +++ b/chrome/browser/ui/cocoa/browser_window_command_handler.mm @@ -16,6 +16,7 @@ #include "chrome/browser/ui/browser_window.h" #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" +#include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" @@ -53,9 +54,8 @@ void UpdateToggleStateWithTag(NSInteger tag, id item, NSWindow* window) { } if (tag == IDC_TOGGLE_FULLSCREEN_TOOLBAR) { - BrowserWindowController* controller = - [browser->window()->GetNativeWindow() windowController]; - SetToggleState([controller shouldHideFullscreenToolbar], item); + PrefService* prefs = browser->profile()->GetPrefs(); + SetToggleState(prefs->GetBoolean(prefs::kHideFullscreenToolbar), item); return; } @@ -173,7 +173,12 @@ Browser* FindBrowserForSender(id sender, NSWindow* window) { } case IDC_PRESENTATION_MODE: { if (NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item)) { - [menuItem setTitle:GetTitleForPresentationModeMenuItem(browser)]; + if (chrome::mac::SupportsSystemFullscreen()) { + [menuItem setHidden:YES]; + enable = NO; + } else { + [menuItem setTitle:GetTitleForPresentationModeMenuItem(browser)]; + } } break; } @@ -209,13 +214,11 @@ Browser* FindBrowserForSender(id sender, NSWindow* window) { break; } case IDC_TOGGLE_FULLSCREEN_TOOLBAR: { - // TODO(spqchan): Implement a preferences for this command and replace - // the Presentation Mode menu item with item. - if (NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item)) { + if (!chrome::mac::SupportsSystemFullscreen()) { + NSMenuItem* menuItem = base::mac::ObjCCast<NSMenuItem>(item); [menuItem setHidden:YES]; - enable = false; + enable = NO; } - break; } default: // Special handling for the contents of the Text Encoding submenu. On diff --git a/chrome/browser/ui/cocoa/browser_window_controller.h b/chrome/browser/ui/cocoa/browser_window_controller.h index d4b1938..f6943fd 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.h +++ b/chrome/browser/ui/cocoa/browser_window_controller.h @@ -531,7 +531,7 @@ class Command; // Toggles and updates the toolbar's visibility in fullscreen mode. This // function toggles between the sliding styles: OMNIBOX_TABS_PRESENT and // OMNIBOX_TABS_HIDDEN. -- (void)toggleFullscreenToolbar; +- (void)setFullscreenToolbarHidden:(BOOL)isHidden; // Returns YES if the browser window is in or entering any fullscreen mode. - (BOOL)isInAnyFullscreenMode; @@ -635,6 +635,9 @@ class Command; // Returns the active tab contents controller's |blockFullscreenResize_| flag. - (BOOL)isActiveTabContentsControllerResizeBlocked; +// Returns the presentation mode controller. +- (PresentationModeController*)presentationModeController; + @end // @interface BrowserWindowController (TestingAPI) diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index 7575a48..e6616ac 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm @@ -81,6 +81,7 @@ #include "chrome/browser/ui/window_sizer/window_sizer.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/command.h" +#include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "chrome/grit/generated_resources.h" #include "chrome/grit/locale_settings.h" @@ -435,6 +436,10 @@ void SetUpBrowserWindowCommandHandler(NSWindow* window) { extensions::ExtensionKeybindingRegistry::ALL_EXTENSIONS, windowShim_.get())); + PrefService* prefs = browser_->profile()->GetPrefs(); + shouldHideFullscreenToolbar_ = + prefs->GetBoolean(prefs::kHideFullscreenToolbar); + blockLayoutSubviews_ = NO; // We are done initializing now. @@ -1916,6 +1921,10 @@ willAnimateFromState:(BookmarkBar::State)oldState [sheet orderOut:self]; } +- (PresentationModeController*)presentationModeController { + return presentationModeController_.get(); +} + - (void)executeExtensionCommand:(const std::string&)extension_id command:(const extensions::Command&)command { // Global commands are handled by the ExtensionCommandsGlobalRegistry @@ -1971,9 +1980,12 @@ willAnimateFromState:(BookmarkBar::State)oldState [self showFullscreenExitBubbleIfNecessary]; } -- (void)toggleFullscreenToolbar { - shouldHideFullscreenToolbar_ = !shouldHideFullscreenToolbar_; +- (void)setFullscreenToolbarHidden:(BOOL)shouldHide { + if (shouldHideFullscreenToolbar_ == shouldHide) + return; + [presentationModeController_ setToolbarFraction:0.0]; + shouldHideFullscreenToolbar_ = shouldHide; if ([self isInAppKitFullscreen]) [self updateFullscreenWithToolbar:!shouldHideFullscreenToolbar_]; } diff --git a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm index df6e2cd..7865cef 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm @@ -14,6 +14,7 @@ #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/devtools/devtools_window_testing.h" +#include "chrome/browser/fullscreen.h" #include "chrome/browser/infobars/infobar_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" @@ -30,6 +31,7 @@ #import "chrome/browser/ui/cocoa/infobars/infobar_container_controller.h" #import "chrome/browser/ui/cocoa/infobars/infobar_controller.h" #import "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h" +#import "chrome/browser/ui/cocoa/presentation_mode_controller.h" #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" #import "chrome/browser/ui/cocoa/tab_contents/overlayable_contents_controller.h" #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" @@ -40,6 +42,7 @@ #include "chrome/browser/ui/find_bar/find_bar_controller.h" #include "chrome/browser/ui/infobar_container_delegate.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" +#include "chrome/common/pref_names.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/testing_profile.h" #include "components/infobars/core/infobar_delegate.h" @@ -316,6 +319,17 @@ class BrowserWindowControllerTest : public InProcessBrowserTest { runner->Run(); } + void VerifyFullscreenToolbarVisibility(fullscreen_mac::SlidingStyle style) { + EXPECT_EQ([[controller() presentationModeController] slidingStyle], style); + + NSRect toolbarFrame = [[[controller() toolbarController] view] frame]; + NSRect screenFrame = [[[controller() window] screen] frame]; + if (style == fullscreen_mac::OMNIBOX_TABS_PRESENT) + EXPECT_LE(NSMaxY(toolbarFrame), NSMaxY(screenFrame)); + else + EXPECT_GE(NSMinY(toolbarFrame), NSMaxY(screenFrame)); + } + NSInteger GetExpectedTopInfoBarTipHeight() { InfoBarContainerController* info_bar_container_controller = [controller() infoBarContainerController]; @@ -673,3 +687,37 @@ IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, FullscreenResizeFlags) { ToggleFullscreenAndWaitForNotification(); VerifyFullscreenResizeFlagsAfterTransition(); } + +// Tests that the omnibox and tabs are hidden/visible in fullscreen mode. +// Ensure that when the user toggles this setting, the omnibox, tabs and +// preferences are updated correctly. +IN_PROC_BROWSER_TEST_F(BrowserWindowControllerTest, + FullscreenToolbarIsVisibleAccordingToPrefs) { + // This feature is only available on SystemFullscreen. + if (!chrome::mac::SupportsSystemFullscreen()) + return; + + // Tests that the preference is set to false by default. + PrefService* prefs = browser()->profile()->GetPrefs(); + EXPECT_FALSE(prefs->GetBoolean(prefs::kHideFullscreenToolbar)); + + // Toggle fullscreen and check if the toolbar is shown. + ToggleFullscreenAndWaitForNotification(); + VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_PRESENT); + + // Toggle the visibility of the fullscreen toolbar. Verify that the toolbar + // is hidden and the preference is correctly updated. + [[controller() presentationModeController] setToolbarFraction:0.0]; + chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR); + EXPECT_TRUE(prefs->GetBoolean(prefs::kHideFullscreenToolbar)); + VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_HIDDEN); + + // Toggle out and back into fullscreen and verify that the toolbar is still + // hidden. + ToggleFullscreenAndWaitForNotification(); + ToggleFullscreenAndWaitForNotification(); + VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_HIDDEN); + + chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR); + EXPECT_FALSE(prefs->GetBoolean(prefs::kHideFullscreenToolbar)); +} diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm index cfc3f59..539a9c2 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm @@ -782,6 +782,7 @@ willPositionSheet:(NSWindow*)sheet [self deregisterForContentViewResizeNotifications]; browser_->WindowFullscreenStateChanged(); + [self.chromeContentView setAutoresizesSubviews:YES]; [self resetCustomAppKitFullscreenVariables]; diff --git a/chrome/browser/ui/exclusive_access/exclusive_access_context.h b/chrome/browser/ui/exclusive_access/exclusive_access_context.h index 63f10be9..6aedf486 100644 --- a/chrome/browser/ui/exclusive_access/exclusive_access_context.h +++ b/chrome/browser/ui/exclusive_access/exclusive_access_context.h @@ -37,8 +37,8 @@ class ExclusiveAccessContext { // Currently only supported on Mac. virtual void UpdateFullscreenWithToolbar(bool with_toolbar); - // Toggles the toolbar state to be hidden or shown in fullscreen. - // Currently only supported on Mac. + // Toggles the toolbar state to be hidden or shown in fullscreen. Updates + // the preference accordingly. Only supported on Mac. virtual void ToggleFullscreenToolbar(); // Returns true if the window is fullscreen with additional UI elements. See diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc index fa0f593..95f0d40 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc @@ -436,7 +436,8 @@ void FullscreenController::ToggleFullscreenModeInternal( // FullscreenWithoutChrome and FullscreenWithToolbar. if (exclusive_access_context->IsFullscreen() && !IsWindowFullscreenForTabOrPending() && - exclusive_access_context->SupportsFullscreenWithToolbar()) { + exclusive_access_context->SupportsFullscreenWithToolbar() && + IsExtensionFullscreenOrPending()) { if (option == BROWSER_WITH_TOOLBAR) { enter_fullscreen = enter_fullscreen || !exclusive_access_context->IsFullscreenWithToolbar(); diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc index f7a2f46..a8514c6 100644 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc @@ -53,7 +53,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() }, { // STATE_BROWSER_FULLSCREEN_NO_CHROME: STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN - STATE_BROWSER_FULLSCREEN_WITH_CHROME, // Event TOGGLE_FULLSCREEN_CHROME + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME STATE_TAB_BROWSER_FULLSCREEN, // Event TAB_FULLSCREEN_TRUE STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event TAB_FULLSCREEN_FALSE STATE_METRO_SNAP, // Event METRO_SNAP_TRUE @@ -64,7 +64,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event WINDOW_CHANGE }, { // STATE_BROWSER_FULLSCREEN_WITH_CHROME: - STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event TOGGLE_FULLSCREEN + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME STATE_TAB_BROWSER_FULLSCREEN_CHROME, // Event TAB_FULLSCREEN_TRUE STATE_BROWSER_FULLSCREEN_WITH_CHROME, // Event TAB_FULLSCREEN_FALSE @@ -124,7 +124,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_TAB_BROWSER_FULLSCREEN_CHROME, // Event WINDOW_CHANGE }, { // STATE_TO_NORMAL: - STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN + STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME,// Event TOGGLE_FULLSCREEN STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME,// Event TOGGLE_FULLSCREEN_CHROME // TODO(scheib) Should be a route back to TAB. http://crbug.com/154196 STATE_TO_NORMAL, // Event TAB_FULLSCREEN_TRUE @@ -137,8 +137,8 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_NORMAL, // Event WINDOW_CHANGE }, { // STATE_TO_BROWSER_FULLSCREEN_NO_CHROME: - STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TOGGLE_FULLSCREEN - STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME,// Event TOGGLE_FULLSCREEN_CHROME + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME // TODO(scheib) Should be a route to TAB_BROWSER http://crbug.com/154196 STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TAB_FULLSCREEN_TRUE STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TAB_FULLSCREEN_FALSE @@ -155,7 +155,7 @@ FullscreenControllerStateTest::FullscreenControllerStateTest() STATE_BROWSER_FULLSCREEN_NO_CHROME, // Event WINDOW_CHANGE }, { // STATE_TO_BROWSER_FULLSCREEN_WITH_CHROME: - STATE_TO_BROWSER_FULLSCREEN_NO_CHROME, // Event TOGGLE_FULLSCREEN + STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN STATE_TO_NORMAL, // Event TOGGLE_FULLSCREEN_CHROME // TODO(scheib) Should be a route to TAB_BROWSER http://crbug.com/154196 STATE_TAB_BROWSER_FULLSCREEN, // Event TAB_FULLSCREEN_TRUE diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index c3d5002..e628ecf 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc @@ -384,6 +384,10 @@ const char kContextualSearchEnabled[] = "search.contextual_search_enabled"; // Boolean that indicates whether the browser should put up a confirmation // window when the user is attempting to quit. Mac only. const char kConfirmToQuitEnabled[] = "browser.confirm_to_quit"; + +// Boolean that indicates whether the browser should hide the toolbar when it's +// in fullscreen. Mac only. +const char kHideFullscreenToolbar[] = "browser.hide_fullscreen_toolbar"; #endif // Boolean which specifies whether we should ask the user if we should download diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index e41a657..4933bed 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h @@ -155,6 +155,7 @@ extern const char kContextualSearchEnabled[]; #endif #if defined(OS_MACOSX) extern const char kConfirmToQuitEnabled[]; +extern const char kHideFullscreenToolbar[]; #endif extern const char kPromptForDownload[]; extern const char kAlternateErrorPagesEnabled[]; |