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

Side by Side Diff: chrome/browser/app_controller_mac.mm

Issue 2325313002: Opt out of macOS Sierra automatic window tabbing (Closed)
Patch Set: Created 4 years, 3 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/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 andEventID:'OURL']; 401 andEventID:'OURL'];
402 [[NSNotificationCenter defaultCenter] removeObserver:self]; 402 [[NSNotificationCenter defaultCenter] removeObserver:self];
403 [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self]; 403 [[[NSWorkspace sharedWorkspace] notificationCenter] removeObserver:self];
404 } 404 }
405 405
406 // (NSApplicationDelegate protocol) This is the Apple-approved place to override 406 // (NSApplicationDelegate protocol) This is the Apple-approved place to override
407 // the default handlers. 407 // the default handlers.
408 - (void)applicationWillFinishLaunching:(NSNotification*)notification { 408 - (void)applicationWillFinishLaunching:(NSNotification*)notification {
409 MacStartupProfiler::GetInstance()->Profile( 409 MacStartupProfiler::GetInstance()->Profile(
410 MacStartupProfiler::WILL_FINISH_LAUNCHING); 410 MacStartupProfiler::WILL_FINISH_LAUNCHING);
411
412 if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)]) {
Nico 2016/09/12 14:13:58 is checking for `setAllowsAutomaticWindowTabbing:`
Sidney San Martín 2016/09/12 15:07:25 You are technically correct — the best kind of cor
413 NSWindow.allowsAutomaticWindowTabbing = NO;
414 }
411 } 415 }
412 416
413 - (void)applicationWillHide:(NSNotification*)notification { 417 - (void)applicationWillHide:(NSNotification*)notification {
414 apps::ExtensionAppShimHandler::OnChromeWillHide(); 418 apps::ExtensionAppShimHandler::OnChromeWillHide();
415 } 419 }
416 420
417 - (BOOL)tryToTerminateApplication:(NSApplication*)app { 421 - (BOOL)tryToTerminateApplication:(NSApplication*)app {
418 // Reset this now that we've received the call to terminate. 422 // Reset this now that we've received the call to terminate.
419 BOOL isPoweringOff = isPoweringOff_; 423 BOOL isPoweringOff = isPoweringOff_;
420 isPoweringOff_ = NO; 424 isPoweringOff_ = NO;
(...skipping 1258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 1683
1680 //--------------------------------------------------------------------------- 1684 //---------------------------------------------------------------------------
1681 1685
1682 namespace app_controller_mac { 1686 namespace app_controller_mac {
1683 1687
1684 bool IsOpeningNewWindow() { 1688 bool IsOpeningNewWindow() {
1685 return g_is_opening_new_window; 1689 return g_is_opening_new_window;
1686 } 1690 }
1687 1691
1688 } // namespace app_controller_mac 1692 } // namespace app_controller_mac
OLDNEW
« base/mac/sdk_forward_declarations.h ('K') | « base/mac/sdk_forward_declarations.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698