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