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

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 2847090: Fix --kiosk to work regardless of the startup pref setting or supplied URLs. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_list.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
===================================================================
--- chrome/browser/views/frame/browser_view.cc (revision 54588)
+++ chrome/browser/views/frame/browser_view.cc (working copy)
@@ -675,6 +675,17 @@
RestoreFocus();
frame_->GetWindow()->Show();
+
+ // The following block also appears in BrowserWindowGtk::Show().
+#if !defined(OS_WIN)
+ // The Browser associated with this browser window must become the active
+ // browser at the time Show() is called. This is the natural behavior under
+ // Windows, but gtk_widget_show won't show the widget (and therefore won't
+ // call OnFocusIn()) until we return to the runloop. Therefore any calls to
+ // BrowserList::GetLastActive() (for example, in bookmark_util), will return
+ // the previous browser instead if we don't explicitly set it here.
+ BrowserList::SetLastActive(browser());
+#endif
}
void BrowserView::SetBounds(const gfx::Rect& bounds) {
« no previous file with comments | « chrome/browser/browser_list.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698