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

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

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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
Index: chrome/browser/ui/apps/chrome_app_delegate.cc
diff --git a/chrome/browser/ui/apps/chrome_app_delegate.cc b/chrome/browser/ui/apps/chrome_app_delegate.cc
index bf653659e3e128c9172805306662caa5a2f7715d..1bd2086769ee19b111b723b37e41febcdf53bd29 100644
--- a/chrome/browser/ui/apps/chrome_app_delegate.cc
+++ b/chrome/browser/ui/apps/chrome_app_delegate.cc
@@ -66,10 +66,10 @@ content::WebContents* OpenURLFromTabInternal(
// window.
chrome::NavigateParams new_tab_params(
static_cast<Browser*>(NULL), params.url, params.transition);
- if (params.disposition == NEW_BACKGROUND_TAB) {
- new_tab_params.disposition = NEW_BACKGROUND_TAB;
+ if (params.disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) {
+ new_tab_params.disposition = WindowOpenDisposition::NEW_BACKGROUND_TAB;
} else {
- new_tab_params.disposition = NEW_FOREGROUND_TAB;
+ new_tab_params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB;
new_tab_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
}
@@ -244,8 +244,9 @@ void ChromeAppDelegate::AddNewContents(content::BrowserContext* context,
Profile::FromBrowserContext(context));
// Force all links to open in a new tab, even if they were trying to open a
// new window.
- disposition =
- disposition == NEW_BACKGROUND_TAB ? disposition : NEW_FOREGROUND_TAB;
+ disposition = disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB
+ ? disposition
+ : WindowOpenDisposition::NEW_FOREGROUND_TAB;
chrome::AddWebContents(displayer.browser(),
NULL,
new_contents,
« no previous file with comments | « chrome/browser/ui/app_list/start_page_service.cc ('k') | chrome/browser/ui/ash/cast_config_delegate_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698