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

Unified Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 11366118: Add support for interstitial pages on android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 8 years, 1 month 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: content/browser/web_contents/web_contents_view_android.cc
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc
index b4d67fa7bc0cb1e03ab524fdbceb9d8e3d4591d6..a44dc49bc1a6cc848eacd69918e7709170084d4d 100644
--- a/content/browser/web_contents/web_contents_view_android.cc
+++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -10,8 +10,8 @@
#include "content/browser/renderer_host/render_widget_host_view_android.h"
#include "content/browser/renderer_host/render_view_host_factory.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
+#include "content/browser/web_contents/interstitial_page_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
-#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/web_contents_delegate.h"
namespace content {
@@ -39,12 +39,15 @@ WebContentsViewAndroid::~WebContentsViewAndroid() {
void WebContentsViewAndroid::SetContentViewCore(
ContentViewCoreImpl* content_view_core) {
content_view_core_ = content_view_core;
- RenderWidgetHostViewAndroid* rwhv = static_cast<RenderWidgetHostViewAndroid*>(
- web_contents_->GetRenderWidgetHostView());
- if (rwhv)
- rwhv->SetContentViewCore(content_view_core_);
+ RenderWidgetHostView* rwhv = web_contents_->GetRenderWidgetHostView();
if (web_contents_->ShowingInterstitialPage()) {
- NOTIMPLEMENTED() << "not upstreamed yet";
+ rwhv = static_cast<InterstitialPageImpl*>(
+ web_contents_->GetInterstitialPage())->
+ GetRenderViewHost()->GetView();
+ }
+ if (rwhv) {
+ static_cast<RenderWidgetHostViewAndroid*>(rwhv)->
+ SetContentViewCore(content_view_core_);
}
}

Powered by Google App Engine
This is Rietveld 408576698