| OLD | NEW |
| 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 "content/renderer/render_view.h" | 5 #include "content/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 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3260 | 3260 |
| 3261 if (top_data_source) { | 3261 if (top_data_source) { |
| 3262 NavigationState* state = NavigationState::FromDataSource(top_data_source); | 3262 NavigationState* state = NavigationState::FromDataSource(top_data_source); |
| 3263 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) | 3263 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) |
| 3264 state->set_was_prefetcher(true); | 3264 state->set_was_prefetcher(true); |
| 3265 } | 3265 } |
| 3266 | 3266 |
| 3267 request.setRequestorID(routing_id_); | 3267 request.setRequestorID(routing_id_); |
| 3268 request.setHasUserGesture(frame->isProcessingUserGesture()); | 3268 request.setHasUserGesture(frame->isProcessingUserGesture()); |
| 3269 | 3269 |
| 3270 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) | 3270 if (!renderer_preferences_.enable_referrers) |
| 3271 request.clearHTTPHeaderField("Referer"); | 3271 request.clearHTTPHeaderField("Referer"); |
| 3272 | 3272 |
| 3273 // Temporary metrics, see site_isolation_metrics.h | 3273 // Temporary metrics, see site_isolation_metrics.h |
| 3274 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); | 3274 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); |
| 3275 } | 3275 } |
| 3276 | 3276 |
| 3277 void RenderView::didReceiveResponse( | 3277 void RenderView::didReceiveResponse( |
| 3278 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { | 3278 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { |
| 3279 | 3279 |
| 3280 // Temporary metrics, see site_isolation_metrics.h | 3280 // Temporary metrics, see site_isolation_metrics.h |
| (...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5104 const webkit_glue::CustomContextMenuContext& custom_context) { | 5104 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5105 if (custom_context.is_pepper_menu) | 5105 if (custom_context.is_pepper_menu) |
| 5106 pepper_delegate_.OnContextMenuClosed(custom_context); | 5106 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5107 else | 5107 else |
| 5108 context_menu_node_.reset(); | 5108 context_menu_node_.reset(); |
| 5109 } | 5109 } |
| 5110 | 5110 |
| 5111 void RenderView::OnNetworkStateChanged(bool online) { | 5111 void RenderView::OnNetworkStateChanged(bool online) { |
| 5112 WebNetworkStateNotifier::setOnLine(online); | 5112 WebNetworkStateNotifier::setOnLine(online); |
| 5113 } | 5113 } |
| OLD | NEW |