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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 2172613002: Renderer-side changes for NoState Prefetch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tests 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 479
480 new NetErrorHelper(render_frame); 480 new NetErrorHelper(render_frame);
481 481
482 if (render_frame->IsMainFrame()) { 482 if (render_frame->IsMainFrame()) {
483 // Only attach MainRenderFrameObserver to the main frame, since 483 // Only attach MainRenderFrameObserver to the main frame, since
484 // we only want to log page load metrics for the main frame. 484 // we only want to log page load metrics for the main frame.
485 new page_load_metrics::MetricsRenderFrameObserver(render_frame); 485 new page_load_metrics::MetricsRenderFrameObserver(render_frame);
486 } else { 486 } else {
487 // Avoid any race conditions from having the browser tell subframes that 487 // Avoid any race conditions from having the browser tell subframes that
488 // they're prerendering. 488 // they're prerendering.
489 if (prerender::PrerenderHelper::IsPrerendering( 489 RenderFrame* main_frame =
Charlie Harrison 2016/08/03 14:40:03 Optional: It might make sense to hide some of this
droger 2016/08/03 16:45:50 Done.
490 render_frame->GetRenderView()->GetMainRenderFrame())) { 490 render_frame->GetRenderView()->GetMainRenderFrame();
491 new prerender::PrerenderHelper(render_frame); 491 if (prerender::PrerenderHelper::IsPrerendering(main_frame)) {
492 new prerender::PrerenderHelper(
493 render_frame,
494 prerender::PrerenderHelper::GetPrerenderMode(main_frame));
492 } 495 }
493 } 496 }
494 497
495 // Set up a mojo service to test if this page is a distiller page. 498 // Set up a mojo service to test if this page is a distiller page.
496 new dom_distiller::DistillerJsRenderFrameObserver( 499 new dom_distiller::DistillerJsRenderFrameObserver(
497 render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL); 500 render_frame, chrome::ISOLATED_WORLD_ID_CHROME_INTERNAL);
498 501
499 // Create DistillabilityAgent to send distillability updates to 502 // Create DistillabilityAgent to send distillability updates to
500 // DistillabilityDriver in the browser process. 503 // DistillabilityDriver in the browser process.
501 new dom_distiller::DistillabilityAgent(render_frame); 504 new dom_distiller::DistillabilityAgent(render_frame);
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 // chrome.system.network.getNetworkInterfaces provides the same 1385 // chrome.system.network.getNetworkInterfaces provides the same
1383 // information. Also, the enforcement of sending and binding UDP is already done 1386 // information. Also, the enforcement of sending and binding UDP is already done
1384 // by chrome extension permission model. 1387 // by chrome extension permission model.
1385 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() { 1388 bool ChromeContentRendererClient::ShouldEnforceWebRTCRoutingPreferences() {
1386 #if defined(ENABLE_EXTENSIONS) 1389 #if defined(ENABLE_EXTENSIONS)
1387 return !IsStandaloneExtensionProcess(); 1390 return !IsStandaloneExtensionProcess();
1388 #else 1391 #else
1389 return true; 1392 return true;
1390 #endif 1393 #endif
1391 } 1394 }
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/chrome_render_frame_observer.cc » ('j') | third_party/WebKit/Source/core/dom/Document.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698