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

Unified Diff: chrome/browser/ui/apps/chrome_app_window_delegate.cc

Issue 187653006: Activate browser window when opening new tab from a packaged app window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/apps/chrome_app_window_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_app_window_delegate.cc b/chrome/browser/ui/apps/chrome_app_window_delegate.cc
index 6bccd2f38f0e4b76421e1879888a7d0b653e3bb3..3bbd9a3ad00e010a89204b043ab63a3b882305bb 100644
--- a/chrome/browser/ui/apps/chrome_app_window_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_window_delegate.cc
@@ -48,9 +48,13 @@ content::WebContents* OpenURLFromTabInternal(
// window.
chrome::NavigateParams new_tab_params(
static_cast<Browser*>(NULL), params.url, params.transition);
- new_tab_params.disposition = params.disposition == NEW_BACKGROUND_TAB
- ? params.disposition
- : NEW_FOREGROUND_TAB;
+ if (params.disposition == NEW_BACKGROUND_TAB) {
+ new_tab_params.disposition = NEW_BACKGROUND_TAB;
+ } else {
+ new_tab_params.disposition = NEW_FOREGROUND_TAB;
+ new_tab_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
+ }
+
new_tab_params.initiating_profile = Profile::FromBrowserContext(context);
chrome::Navigate(&new_tab_params);
« 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