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

Side by Side Diff: chrome/browser/android/tab_web_contents_delegate_android.cc

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: Review comments Created 4 years, 3 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
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 "chrome/browser/android/tab_web_contents_delegate_android.h" 5 #include "chrome/browser/android/tab_web_contents_delegate_android.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 blink::WebWindowFeatures())) { 334 blink::WebWindowFeatures())) {
335 return nullptr; 335 return nullptr;
336 } 336 }
337 } 337 }
338 338
339 if (disposition == WindowOpenDisposition::CURRENT_TAB) { 339 if (disposition == WindowOpenDisposition::CURRENT_TAB) {
340 // Only prerender for a current-tab navigation to avoid session storage 340 // Only prerender for a current-tab navigation to avoid session storage
341 // namespace issues. 341 // namespace issues.
342 nav_params.target_contents = source; 342 nav_params.target_contents = source;
343 prerender::PrerenderManager* prerender_manager = 343 prerender::PrerenderManager* prerender_manager =
344 prerender::PrerenderManagerFactory::GetForProfile(profile); 344 prerender::PrerenderManagerFactory::GetForBrowserContext(profile);
345 if (prerender_manager && 345 if (prerender_manager &&
346 prerender_manager->MaybeUsePrerenderedPage(params.url, &nav_params)) { 346 prerender_manager->MaybeUsePrerenderedPage(params.url, &nav_params)) {
347 return nav_params.target_contents; 347 return nav_params.target_contents;
348 } 348 }
349 } 349 }
350 350
351 return WebContentsDelegateAndroid::OpenURLFromTab(source, params); 351 return WebContentsDelegateAndroid::OpenURLFromTab(source, params);
352 } 352 }
353 353
354 bool TabWebContentsDelegateAndroid::ShouldResumeRequestsForCreatedWindow() { 354 bool TabWebContentsDelegateAndroid::ShouldResumeRequestsForCreatedWindow() {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 jboolean IsCapturingVideo(JNIEnv* env, 457 jboolean IsCapturingVideo(JNIEnv* env,
458 const JavaParamRef<jclass>& clazz, 458 const JavaParamRef<jclass>& clazz,
459 const JavaParamRef<jobject>& java_web_contents) { 459 const JavaParamRef<jobject>& java_web_contents) {
460 content::WebContents* web_contents = 460 content::WebContents* web_contents =
461 content::WebContents::FromJavaWebContents(java_web_contents); 461 content::WebContents::FromJavaWebContents(java_web_contents);
462 scoped_refptr<MediaStreamCaptureIndicator> indicator = 462 scoped_refptr<MediaStreamCaptureIndicator> indicator =
463 MediaCaptureDevicesDispatcher::GetInstance()-> 463 MediaCaptureDevicesDispatcher::GetInstance()->
464 GetMediaStreamCaptureIndicator(); 464 GetMediaStreamCaptureIndicator();
465 return indicator->IsCapturingVideo(web_contents); 465 return indicator->IsCapturingVideo(web_contents);
466 } 466 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698