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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_browsertest.mm

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698