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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 2833923002: WebView: carefully check size for SafeBrowsing interstitial (Closed)
Patch Set: Also check if attached, add @VisibleForTesting Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <utility> 8 #include <utility>
9 9
10 #include "android_webview/browser/aw_browser_context.h" 10 #include "android_webview/browser/aw_browser_context.h"
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 web_contents_->GetRenderViewHost()) { 1400 web_contents_->GetRenderViewHost()) {
1401 compositor_id.process_id = web_contents_->GetRenderProcessHost()->GetID(); 1401 compositor_id.process_id = web_contents_->GetRenderProcessHost()->GetID();
1402 compositor_id.routing_id = 1402 compositor_id.routing_id =
1403 web_contents_->GetRenderViewHost()->GetRoutingID(); 1403 web_contents_->GetRenderViewHost()->GetRoutingID();
1404 } else { 1404 } else {
1405 LOG(WARNING) << "failed setting the compositor on detaching interstitital"; 1405 LOG(WARNING) << "failed setting the compositor on detaching interstitital";
1406 } 1406 }
1407 browser_view_renderer_.SetActiveCompositorID(compositor_id); 1407 browser_view_renderer_.SetActiveCompositorID(compositor_id);
1408 } 1408 }
1409 1409
1410 bool AwContents::CanShowInterstitial() { 1410 bool AwContents::CanShowBigInterstitial() {
1411 JNIEnv* env = AttachCurrentThread(); 1411 JNIEnv* env = AttachCurrentThread();
1412 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 1412 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1413 if (obj.is_null()) 1413 if (obj.is_null())
1414 return false; 1414 return false;
1415 return Java_AwContents_canShowInterstitial(env, obj); 1415 return Java_AwContents_canShowBigInterstitial(env, obj);
1416 } 1416 }
1417 1417
1418 void AwContents::CallProceedOnInterstitialForTesting( 1418 void AwContents::CallProceedOnInterstitialForTesting(
1419 JNIEnv* env, 1419 JNIEnv* env,
1420 const base::android::JavaParamRef<jobject>& obj) { 1420 const base::android::JavaParamRef<jobject>& obj) {
1421 DCHECK(web_contents_->GetInterstitialPage()); 1421 DCHECK(web_contents_->GetInterstitialPage());
1422 web_contents_->GetInterstitialPage()->Proceed(); 1422 web_contents_->GetInterstitialPage()->Proceed();
1423 } 1423 }
1424 1424
1425 void AwContents::CallDontProceedOnInterstitialForTesting( 1425 void AwContents::CallDontProceedOnInterstitialForTesting(
(...skipping 23 matching lines...) Expand all
1449 1449
1450 return Java_AwContents_onRenderProcessGoneDetail(env, obj, 1450 return Java_AwContents_onRenderProcessGoneDetail(env, obj,
1451 child_process_id, crashed); 1451 child_process_id, crashed);
1452 } 1452 }
1453 1453
1454 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { 1454 void AwContents::RenderProcessReady(content::RenderProcessHost* host) {
1455 UpdateRendererPriority(); 1455 UpdateRendererPriority();
1456 } 1456 }
1457 1457
1458 } // namespace android_webview 1458 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698