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

Unified Diff: chrome/browser/extensions/extension_tab_util.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/extensions/extension_tab_util.cc
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index cfd503cbec708da7c81caaf0fe28e9b84fe64214..0737215042330c549b7ccc7db051170829efadbe 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -242,8 +242,9 @@ base::DictionaryValue* ExtensionTabUtil::OpenTab(
add_types |= TabStripModel::ADD_PINNED;
chrome::NavigateParams navigate_params(
browser, url, ui::PAGE_TRANSITION_LINK);
- navigate_params.disposition =
- active ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
+ navigate_params.disposition = active
+ ? WindowOpenDisposition::NEW_FOREGROUND_TAB
+ : WindowOpenDisposition::NEW_BACKGROUND_TAB;
navigate_params.tabstrip_index = index;
navigate_params.tabstrip_add_types = add_types;
chrome::Navigate(&navigate_params);
@@ -595,7 +596,7 @@ void ExtensionTabUtil::CreateTab(WebContents* web_contents,
// among other things, whether the location bar gets displayed.
// TODO(mpcomplete): This seems wrong. What if the extension content is hosted
// in a tab?
- if (disposition == NEW_POPUP)
+ if (disposition == WindowOpenDisposition::NEW_POPUP)
params.extension_app_id = extension_id;
params.disposition = disposition;

Powered by Google App Engine
This is Rietveld 408576698