| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
| 9 | 9 |
| 10 #include "base/mac/sdk_forward_declarations.h" | 10 #include "base/mac/sdk_forward_declarations.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 368 |
| 369 // There is no fullscreen button on OSX 10.6 or OSX 10.10+. | 369 // There is no fullscreen button on OSX 10.6 or OSX 10.10+. |
| 370 NSView* view = [window standardWindowButton:NSWindowFullScreenButton]; | 370 NSView* view = [window standardWindowButton:NSWindowFullScreenButton]; |
| 371 if (view) | 371 if (view) |
| 372 checker.CheckViewExposed(view); | 372 checker.CheckViewExposed(view); |
| 373 } | 373 } |
| 374 | 374 |
| 375 // NOTIFICATION_FULLSCREEN_CHANGED is sent asynchronously. | 375 // NOTIFICATION_FULLSCREEN_CHANGED is sent asynchronously. |
| 376 // This method toggles fullscreen and waits for the notification. | 376 // This method toggles fullscreen and waits for the notification. |
| 377 void ToggleFullscreenAndWaitForNotification() { | 377 void ToggleFullscreenAndWaitForNotification() { |
| 378 scoped_ptr<FullscreenNotificationObserver> waiter( | 378 std::unique_ptr<FullscreenNotificationObserver> waiter( |
| 379 new FullscreenNotificationObserver()); | 379 new FullscreenNotificationObserver()); |
| 380 browser() | 380 browser() |
| 381 ->exclusive_access_manager() | 381 ->exclusive_access_manager() |
| 382 ->fullscreen_controller() | 382 ->fullscreen_controller() |
| 383 ->ToggleBrowserFullscreenWithToolbar(); | 383 ->ToggleBrowserFullscreenWithToolbar(); |
| 384 waiter->Wait(); | 384 waiter->Wait(); |
| 385 } | 385 } |
| 386 | 386 |
| 387 // Verifies that the flags |blockLayoutSubviews_| and |blockFullscreenResize| | 387 // Verifies that the flags |blockLayoutSubviews_| and |blockFullscreenResize| |
| 388 // are false. | 388 // are false. |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 // Toggle out and back into fullscreen and verify that the toolbar is still | 715 // Toggle out and back into fullscreen and verify that the toolbar is still |
| 716 // hidden. | 716 // hidden. |
| 717 ToggleFullscreenAndWaitForNotification(); | 717 ToggleFullscreenAndWaitForNotification(); |
| 718 ToggleFullscreenAndWaitForNotification(); | 718 ToggleFullscreenAndWaitForNotification(); |
| 719 [[controller() presentationModeController] setMenuBarRevealProgress:0.0]; | 719 [[controller() presentationModeController] setMenuBarRevealProgress:0.0]; |
| 720 VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_HIDDEN); | 720 VerifyFullscreenToolbarVisibility(fullscreen_mac::OMNIBOX_TABS_HIDDEN); |
| 721 | 721 |
| 722 chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR); | 722 chrome::ExecuteCommand(browser(), IDC_TOGGLE_FULLSCREEN_TOOLBAR); |
| 723 EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar)); | 723 EXPECT_TRUE(prefs->GetBoolean(prefs::kShowFullscreenToolbar)); |
| 724 } | 724 } |
| OLD | NEW |