| 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* application = [NSApplication sharedApplication]; |
| 746 if ([application respondsToSelector: |
| 747 @selector(setAutomaticCustomizeTouchBarMenuItemEnabled:)]) { |
| 748 [application setAutomaticCustomizeTouchBarMenuItemEnabled:YES]; |
| 749 } |
| 744 } | 750 } |
| 745 | 751 |
| 746 // Helper function for populating and displaying the in progress downloads at | 752 // Helper function for populating and displaying the in progress downloads at |
| 747 // exit alert panel. | 753 // exit alert panel. |
| 748 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { | 754 - (BOOL)userWillWaitForInProgressDownloads:(int)downloadCount { |
| 749 NSString* titleText = nil; | 755 NSString* titleText = nil; |
| 750 NSString* explanationText = nil; | 756 NSString* explanationText = nil; |
| 751 NSString* waitTitle = nil; | 757 NSString* waitTitle = nil; |
| 752 NSString* exitTitle = nil; | 758 NSString* exitTitle = nil; |
| 753 | 759 |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 | 1608 |
| 1603 //--------------------------------------------------------------------------- | 1609 //--------------------------------------------------------------------------- |
| 1604 | 1610 |
| 1605 namespace app_controller_mac { | 1611 namespace app_controller_mac { |
| 1606 | 1612 |
| 1607 bool IsOpeningNewWindow() { | 1613 bool IsOpeningNewWindow() { |
| 1608 return g_is_opening_new_window; | 1614 return g_is_opening_new_window; |
| 1609 } | 1615 } |
| 1610 | 1616 |
| 1611 } // namespace app_controller_mac | 1617 } // namespace app_controller_mac |
| OLD | NEW |