Chromium Code Reviews| 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/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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 734 if (localState) { | 734 if (localState) { |
| 735 localPrefRegistrar_.Init(localState); | 735 localPrefRegistrar_.Init(localState); |
| 736 localPrefRegistrar_.Add( | 736 localPrefRegistrar_.Add( |
| 737 prefs::kAllowFileSelectionDialogs, | 737 prefs::kAllowFileSelectionDialogs, |
| 738 base::Bind(&chrome::BrowserCommandController::UpdateOpenFileState, | 738 base::Bind(&chrome::BrowserCommandController::UpdateOpenFileState, |
| 739 menuState_.get())); | 739 menuState_.get())); |
| 740 } | 740 } |
| 741 | 741 |
| 742 handoff_active_url_observer_bridge_.reset( | 742 handoff_active_url_observer_bridge_.reset( |
| 743 new HandoffActiveURLObserverBridge(self)); | 743 new HandoffActiveURLObserverBridge(self)); |
| 744 | |
| 745 [NSApplication sharedApplication].automaticCustomizeTouchBarMenuItemEnabled = | |
|
Robert Sesek
2017/04/13 18:45:32
Won't this crash on anything <10.12.1?
spqchan
2017/04/13 21:13:50
Good point, I added in the fix
| |
| 746 YES; | |
| 744 } | 747 } |
| 745 | 748 |
| 746 // Helper function for populating and displaying the in progress downloads at | 749 // Helper function for populating and displaying the in progress downloads at |
| 747 // exit alert panel. | 750 // exit alert panel. |
| 748 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { | 751 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { |
| 749 NSString* titleText = nil; | 752 NSString* titleText = nil; |
| 750 NSString* explanationText = nil; | 753 NSString* explanationText = nil; |
| 751 NSString* waitTitle = nil; | 754 NSString* waitTitle = nil; |
| 752 NSString* exitTitle = nil; | 755 NSString* exitTitle = nil; |
| 753 | 756 |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1602 | 1605 |
| 1603 //--------------------------------------------------------------------------- | 1606 //--------------------------------------------------------------------------- |
| 1604 | 1607 |
| 1605 namespace app_controller_mac { | 1608 namespace app_controller_mac { |
| 1606 | 1609 |
| 1607 bool IsOpeningNewWindow() { | 1610 bool IsOpeningNewWindow() { |
| 1608 return g_is_opening_new_window; | 1611 return g_is_opening_new_window; |
| 1609 } | 1612 } |
| 1610 | 1613 |
| 1611 } // namespace app_controller_mac | 1614 } // namespace app_controller_mac |
| OLD | NEW |