| 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 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 // and is getting here because the foreground window is not a browser window. | 937 // and is getting here because the foreground window is not a browser window. |
| 938 if ([sender respondsToSelector:@selector(window)]) { | 938 if ([sender respondsToSelector:@selector(window)]) { |
| 939 id delegate = [[sender window] windowController]; | 939 id delegate = [[sender window] windowController]; |
| 940 if ([delegate respondsToSelector:@selector(commandDispatch:)]) { | 940 if ([delegate respondsToSelector:@selector(commandDispatch:)]) { |
| 941 [delegate commandDispatch:sender]; | 941 [delegate commandDispatch:sender]; |
| 942 return; | 942 return; |
| 943 } | 943 } |
| 944 } | 944 } |
| 945 | 945 |
| 946 // Ignore commands during session restore's browser creation. It uses a | 946 // Ignore commands during session restore's browser creation. It uses a |
| 947 // nested message loop and commands dispatched during this operation cause | 947 // nested run loop and commands dispatched during this operation cause |
| 948 // havoc. | 948 // havoc. |
| 949 if (SessionRestore::IsRestoring(lastProfile) && | 949 if (SessionRestore::IsRestoring(lastProfile) && |
| 950 base::RunLoop::IsNestedOnCurrentThread()) { | 950 base::RunLoop::IsNestedOnCurrentThread()) { |
| 951 return; | 951 return; |
| 952 } | 952 } |
| 953 | 953 |
| 954 NSInteger tag = [sender tag]; | 954 NSInteger tag = [sender tag]; |
| 955 | 955 |
| 956 // If there are no browser windows, and we are trying to open a browser | 956 // If there are no browser windows, and we are trying to open a browser |
| 957 // for a locked profile or the system profile, we have to show the User | 957 // for a locked profile or the system profile, we have to show the User |
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 | 1610 |
| 1611 //--------------------------------------------------------------------------- | 1611 //--------------------------------------------------------------------------- |
| 1612 | 1612 |
| 1613 namespace app_controller_mac { | 1613 namespace app_controller_mac { |
| 1614 | 1614 |
| 1615 bool IsOpeningNewWindow() { | 1615 bool IsOpeningNewWindow() { |
| 1616 return g_is_opening_new_window; | 1616 return g_is_opening_new_window; |
| 1617 } | 1617 } |
| 1618 | 1618 |
| 1619 } // namespace app_controller_mac | 1619 } // namespace app_controller_mac |
| OLD | NEW |