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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
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 "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 if ([delegate isKindOfClass:[BrowserWindowController class]]) { 830 if ([delegate isKindOfClass:[BrowserWindowController class]]) {
831 [delegate commandDispatch:sender]; 831 [delegate commandDispatch:sender];
832 return; 832 return;
833 } 833 }
834 } 834 }
835 835
836 // Ignore commands during session restore's browser creation. It uses a 836 // Ignore commands during session restore's browser creation. It uses a
837 // nested message loop and commands dispatched during this operation cause 837 // nested message loop and commands dispatched during this operation cause
838 // havoc. 838 // havoc.
839 if (SessionRestore::IsRestoring(lastProfile) && 839 if (SessionRestore::IsRestoring(lastProfile) &&
840 MessageLoop::current()->IsNested()) 840 base::MessageLoop::current()->IsNested())
841 return; 841 return;
842 842
843 NSInteger tag = [sender tag]; 843 NSInteger tag = [sender tag];
844 switch (tag) { 844 switch (tag) {
845 case IDC_NEW_TAB: 845 case IDC_NEW_TAB:
846 // Create a new tab in an existing browser window (which we activate) if 846 // Create a new tab in an existing browser window (which we activate) if
847 // possible. 847 // possible.
848 if (Browser* browser = ActivateBrowser(lastProfile)) { 848 if (Browser* browser = ActivateBrowser(lastProfile)) {
849 chrome::ExecuteCommand(browser, IDC_NEW_TAB); 849 chrome::ExecuteCommand(browser, IDC_NEW_TAB);
850 break; 850 break;
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 1318
1319 //--------------------------------------------------------------------------- 1319 //---------------------------------------------------------------------------
1320 1320
1321 namespace app_controller_mac { 1321 namespace app_controller_mac {
1322 1322
1323 bool IsOpeningNewWindow() { 1323 bool IsOpeningNewWindow() {
1324 return g_is_opening_new_window; 1324 return g_is_opening_new_window;
1325 } 1325 }
1326 1326
1327 } // namespace app_controller_mac 1327 } // namespace app_controller_mac
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698