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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_utils.mm

Issue 2395083003: Use -[NSApp activateIgnoringOtherApps:NO] instead of -[NSRunningApplication activateWithOptions:]. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/cocoa/browser_window_utils.h" 5 #import "chrome/browser/ui/cocoa/browser_window_utils.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/global_keyboard_shortcuts_mac.h" 9 #include "chrome/browser/global_keyboard_shortcuts_mac.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // the window's root view when not in presentation mode. 140 // the window's root view when not in presentation mode.
141 return NSMakePoint(kPatternHorizontalOffset, 141 return NSMakePoint(kPatternHorizontalOffset,
142 NSHeight([tabStripView bounds]) + 142 NSHeight([tabStripView bounds]) +
143 GetPatternVerticalOffsetWithTabStrip(false)); 143 GetPatternVerticalOffsetWithTabStrip(false));
144 } 144 }
145 145
146 + (void)activateWindowForController:(NSWindowController*)controller { 146 + (void)activateWindowForController:(NSWindowController*)controller {
147 // Per http://crbug.com/73779 and http://crbug.com/75223, we need this to 147 // Per http://crbug.com/73779 and http://crbug.com/75223, we need this to
148 // properly activate windows if Chrome is not the active application. 148 // properly activate windows if Chrome is not the active application.
149 [[controller window] makeKeyAndOrderFront:controller]; 149 [[controller window] makeKeyAndOrderFront:controller];
150 [[NSRunningApplication currentApplication] activateWithOptions:0]; 150 [NSApp activateIgnoringOtherApps:NO];
151 } 151 }
152 152
153 @end 153 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698