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

Unified Diff: chrome/browser/ui/singleton_tabs.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/singleton_tabs.cc
diff --git a/chrome/browser/ui/singleton_tabs.cc b/chrome/browser/ui/singleton_tabs.cc
index 870e8dfbab2ddaa3153fdbc77b307a3975a62565..042f85ff071ccb64edfd13e5d99ebf6510a38ce0 100644
--- a/chrome/browser/ui/singleton_tabs.cc
+++ b/chrome/browser/ui/singleton_tabs.cc
@@ -54,7 +54,7 @@ void ShowSingletonTabOverwritingNTP(Browser* browser,
search::IsInstantNTP(contents) ||
contents_url == GURL(url::kAboutBlankURL)) &&
GetIndexOfSingletonTab(&local_params) < 0) {
- local_params.disposition = CURRENT_TAB;
+ local_params.disposition = WindowOpenDisposition::CURRENT_TAB;
}
}
@@ -64,7 +64,7 @@ void ShowSingletonTabOverwritingNTP(Browser* browser,
NavigateParams GetSingletonTabNavigateParams(Browser* browser,
const GURL& url) {
NavigateParams params(browser, url, ui::PAGE_TRANSITION_AUTO_BOOKMARK);
- params.disposition = SINGLETON_TAB;
+ params.disposition = WindowOpenDisposition::SINGLETON_TAB;
params.window_action = NavigateParams::SHOW_WINDOW;
params.user_gesture = true;
params.tabstrip_add_types |= TabStripModel::ADD_INHERIT_OPENER;
@@ -74,7 +74,7 @@ NavigateParams GetSingletonTabNavigateParams(Browser* browser,
// Returns the index of an existing singleton tab in |params->browser| matching
// the URL specified in |params|.
int GetIndexOfSingletonTab(NavigateParams* params) {
- if (params->disposition != SINGLETON_TAB)
+ if (params->disposition != WindowOpenDisposition::SINGLETON_TAB)
return -1;
// In case the URL was rewritten by the BrowserURLHandler we need to ensure
« no previous file with comments | « chrome/browser/ui/settings_window_manager.cc ('k') | chrome/browser/ui/startup/startup_browser_creator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698