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

Unified Diff: chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc

Issue 23264020: Move Android to use new Popup Blocker API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Comments Created 7 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/blocked_content/popup_blocker_tab_helper.cc
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
index 0d27929e56b6780ae2ffa1312fe7f78aeb8b8ba1..407557f9f0d896e47e10cad851109ee08afa1e33 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
@@ -20,6 +20,10 @@
#include "content/public/browser/web_contents_view.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
+#if defined(OS_ANDROID)
+#include "chrome/browser/ui/android/tab_model/tab_model_list.h"
+#endif
+
using WebKit::WebWindowFeatures;
DEFINE_WEB_CONTENTS_USER_DATA_KEY(PopupBlockerTabHelper);
@@ -139,7 +143,11 @@ void PopupBlockerTabHelper::ShowBlockedPopup(int32 id) {
BlockedRequest* popup = blocked_popups_.Lookup(id);
if (!popup)
return;
+#if defined(OS_ANDROID)
+ TabModelList::HandleNavigation(&popup->params);
+#else
chrome::Navigate(&popup->params);
+#endif
if (popup->params.target_contents) {
popup->params.target_contents->Send(new ChromeViewMsg_SetWindowFeatures(
popup->params.target_contents->GetRoutingID(), popup->window_features));

Powered by Google App Engine
This is Rietveld 408576698