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

Unified Diff: extensions/browser/guest_view/web_view/web_view_guest.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: extensions/browser/guest_view/web_view/web_view_guest.cc
diff --git a/extensions/browser/guest_view/web_view/web_view_guest.cc b/extensions/browser/guest_view/web_view/web_view_guest.cc
index 40b36f759e4b1a9ceadd37e25432915356c81699..bcb6f69fa944ea57c1942c7f1c816d502c43a799 100644
--- a/extensions/browser/guest_view/web_view/web_view_guest.cc
+++ b/extensions/browser/guest_view/web_view/web_view_guest.cc
@@ -103,19 +103,19 @@ uint32_t GetStoragePartitionRemovalMask(uint32_t web_view_removal_mask) {
std::string WindowOpenDispositionToString(
WindowOpenDisposition window_open_disposition) {
switch (window_open_disposition) {
- case IGNORE_ACTION:
+ case WindowOpenDisposition::IGNORE_ACTION:
return "ignore";
- case SAVE_TO_DISK:
+ case WindowOpenDisposition::SAVE_TO_DISK:
return "save_to_disk";
- case CURRENT_TAB:
+ case WindowOpenDisposition::CURRENT_TAB:
return "current_tab";
- case NEW_BACKGROUND_TAB:
+ case WindowOpenDisposition::NEW_BACKGROUND_TAB:
return "new_background_tab";
- case NEW_FOREGROUND_TAB:
+ case WindowOpenDisposition::NEW_FOREGROUND_TAB:
return "new_foreground_tab";
- case NEW_WINDOW:
+ case WindowOpenDisposition::NEW_WINDOW:
return "new_window";
- case NEW_POPUP:
+ case WindowOpenDisposition::NEW_POPUP:
return "new_popup";
default:
NOTREACHED() << "Unknown Window Open Disposition";
@@ -1273,7 +1273,7 @@ WebContents* WebViewGuest::OpenURLFromTab(
if (!params.is_renderer_initiated &&
(!content::ChildProcessSecurityPolicy::GetInstance()->IsWebSafeScheme(
params.url.scheme()) ||
- params.disposition != CURRENT_TAB)) {
+ params.disposition != WindowOpenDisposition::CURRENT_TAB)) {
if (!owner_web_contents()->GetDelegate())
return nullptr;
return owner_web_contents()->GetDelegate()->OpenURLFromTab(
@@ -1309,7 +1309,7 @@ WebContents* WebViewGuest::OpenURLFromTab(
// to navigate to a URL that it is not allowed to navigate to, a 'loadabort'
// event will fire in the embedder, and the guest will be navigated to
// about:blank.
- if (params.disposition == CURRENT_TAB) {
+ if (params.disposition == WindowOpenDisposition::CURRENT_TAB) {
LoadURLWithParams(params.url, params.referrer, params.transition,
true /* force_navigation */);
return web_contents();

Powered by Google App Engine
This is Rietveld 408576698