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

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

Issue 6542016: Add LOAD_PRERENDER to prerender motivated load requests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: upload to match latest webkit patch Created 9 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/base/load_flags_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/render_view.h" 5 #include "chrome/renderer/render_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 3600 matching lines...) Expand 10 before | Expand all | Expand 10 after
3611 } 3611 }
3612 3612
3613 if (top_data_source) { 3613 if (top_data_source) {
3614 NavigationState* state = NavigationState::FromDataSource(top_data_source); 3614 NavigationState* state = NavigationState::FromDataSource(top_data_source);
3615 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) 3615 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch)
3616 state->set_was_prefetcher(true); 3616 state->set_was_prefetcher(true);
3617 } 3617 }
3618 3618
3619 request.setRequestorID(routing_id_); 3619 request.setRequestorID(routing_id_);
3620 request.setHasUserGesture(frame->isProcessingUserGesture()); 3620 request.setHasUserGesture(frame->isProcessingUserGesture());
3621 request.setForPrerendering(is_prerendering_);
3621 3622
3622 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) 3623 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers))
3623 request.clearHTTPHeaderField("Referer"); 3624 request.clearHTTPHeaderField("Referer");
3624 3625
3625 // Temporary metrics, see site_isolation_metrics.h 3626 // Temporary metrics, see site_isolation_metrics.h
3626 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); 3627 SiteIsolationMetrics::AddRequest(identifier, request.targetType());
3627 } 3628 }
3628 3629
3629 void RenderView::didReceiveResponse( 3630 void RenderView::didReceiveResponse(
3630 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { 3631 WebFrame* frame, unsigned identifier, const WebURLResponse& response) {
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after
5672 } 5673 }
5673 } 5674 }
5674 5675
5675 void RenderView::OnContextMenuClosed( 5676 void RenderView::OnContextMenuClosed(
5676 const webkit_glue::CustomContextMenuContext& custom_context) { 5677 const webkit_glue::CustomContextMenuContext& custom_context) {
5677 if (custom_context.is_pepper_menu) 5678 if (custom_context.is_pepper_menu)
5678 pepper_delegate_.OnContextMenuClosed(custom_context); 5679 pepper_delegate_.OnContextMenuClosed(custom_context);
5679 else 5680 else
5680 context_menu_node_.reset(); 5681 context_menu_node_.reset();
5681 } 5682 }
OLDNEW
« no previous file with comments | « no previous file | net/base/load_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698