diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 23:19:45 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-13 23:19:45 +0000 |
commit | d76b545dfbee1cb546d7595a1cfc2c3c0ba0efe3 (patch) | |
tree | ae852e59407f6ad3001d95079e83aa4376279fe0 /chrome/browser/tab_contents | |
parent | 6254067311c84cdd1edc01fadc950a5f14e4854f (diff) | |
download | chromium_src-d76b545dfbee1cb546d7595a1cfc2c3c0ba0efe3.zip chromium_src-d76b545dfbee1cb546d7595a1cfc2c3c0ba0efe3.tar.gz chromium_src-d76b545dfbee1cb546d7595a1cfc2c3c0ba0efe3.tar.bz2 |
When you clicked Get Themes in Mac prefs, the browser window containing the themes gallery wasn't coming to the front.
There was an implicit assumption on Windows that TabContentsViewWin::Focus caused the window containing the TabContents to be foregrounded. This is because on Windows a HWND is focused with a call to SetFocus, which activates the containing top level window. On Mac, TabContentsViewMac::Focus needs to explicitly activate the containing window.
Also, changes the Mac preferences code to call the same function as on Windows, for simplicity.
Note: the "foreground" parameter to AddTabWithURL means the tab is opened in the foreground, not that the window is activated.
http://crbug.com/18157
TEST=none
Review URL: http://codereview.chromium.org/165492
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23378 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.mm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index 281d7d1..1b3877c 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -144,6 +144,7 @@ void TabContentsViewMac::SizeContents(const gfx::Size& size) { void TabContentsViewMac::Focus() { [[cocoa_view_.get() window] makeFirstResponder:GetContentNativeView()]; + [[cocoa_view_.get() window] makeKeyAndOrderFront:GetContentNativeView()]; } void TabContentsViewMac::SetInitialFocus() { |