Skip to content

Commit

Permalink
Revert of BrowserWindowCocoa::Show should activate the window (patchset
Browse files Browse the repository at this point in the history
chromium#1 id:1 of https://codereview.chromium.org/1166643003/ )

Reason for revert:
Caused regression: http://crbug.com/500038, and http://crbug.com/496786

Original issue's description:
> BrowserWindowCocoa::Show should activate the window
>
> When a new tab/window is opened on Mac, the window is currently brought
> to the front relative to other Chrome windows, but not relative to other
> apps. This often goes unnoticed, since Chrome is often already the
> active app, but it's particularly noticeable when clicking on a push
> notification opens a new tab/window, as this window will remain
> underneath other apps if Chrome wasn't already in the foreground.
>
> This patch makes Show always Activate the window as well.
>
> BUG=470830
> TEST=manual, follow steps in https://crbug.com/470830
>
> Committed: https://crrev.com/b13b6d7b2c7ad67c1b1937897fe3c26527eeb943
> Cr-Commit-Position: refs/heads/master@{#332615}

R=avi@chromium.org,johnme@chromium.org
BUG=470830

Review URL: https://codereview.chromium.org/1359483002

Cr-Commit-Position: refs/heads/master@{#349884}
  • Loading branch information
andresantoso authored and Commit bot committed Sep 20, 2015
1 parent a8438b2 commit bfacce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/ui/cocoa/browser_window_cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ - (void)validateText:(NSString*)text {
}

{
TRACE_EVENT0("ui", "BrowserWindowCocoa::Show Activate");
TRACE_EVENT0("ui", "BrowserWindowCocoa::Show makeKeyAndOrderFront");
// This call takes up a substantial part of startup time, and an even more
// substantial part of startup time when any CALayers are part of the
// window's NSView heirarchy.
Activate();
[window() makeKeyAndOrderFront:controller_];
}

// When creating windows from nibs it is necessary to |makeKeyAndOrderFront:|
Expand Down

0 comments on commit bfacce0

Please sign in to comment.