| 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 3197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3208 | 3208 |
| 3209 if (top_data_source) { | 3209 if (top_data_source) { |
| 3210 NavigationState* state = NavigationState::FromDataSource(top_data_source); | 3210 NavigationState* state = NavigationState::FromDataSource(top_data_source); |
| 3211 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) | 3211 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) |
| 3212 state->set_was_prefetcher(true); | 3212 state->set_was_prefetcher(true); |
| 3213 } | 3213 } |
| 3214 | 3214 |
| 3215 request.setRequestorID(routing_id_); | 3215 request.setRequestorID(routing_id_); |
| 3216 request.setHasUserGesture(frame->isProcessingUserGesture()); | 3216 request.setHasUserGesture(frame->isProcessingUserGesture()); |
| 3217 | 3217 |
| 3218 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) | 3218 if (!renderer_preferences_.enable_referrers) |
| 3219 request.clearHTTPHeaderField("Referer"); | 3219 request.clearHTTPHeaderField("Referer"); |
| 3220 | 3220 |
| 3221 // Temporary metrics, see site_isolation_metrics.h | 3221 // Temporary metrics, see site_isolation_metrics.h |
| 3222 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); | 3222 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); |
| 3223 } | 3223 } |
| 3224 | 3224 |
| 3225 void RenderView::didReceiveResponse( | 3225 void RenderView::didReceiveResponse( |
| 3226 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { | 3226 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { |
| 3227 | 3227 |
| 3228 // Temporary metrics, see site_isolation_metrics.h | 3228 // Temporary metrics, see site_isolation_metrics.h |
| (...skipping 1810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5039 const webkit_glue::CustomContextMenuContext& custom_context) { | 5039 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5040 if (custom_context.is_pepper_menu) | 5040 if (custom_context.is_pepper_menu) |
| 5041 pepper_delegate_.OnContextMenuClosed(custom_context); | 5041 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5042 else | 5042 else |
| 5043 context_menu_node_.reset(); | 5043 context_menu_node_.reset(); |
| 5044 } | 5044 } |
| 5045 | 5045 |
| 5046 void RenderView::OnNetworkStateChanged(bool online) { | 5046 void RenderView::OnNetworkStateChanged(bool online) { |
| 5047 WebNetworkStateNotifier::setOnLine(online); | 5047 WebNetworkStateNotifier::setOnLine(online); |
| 5048 } | 5048 } |
| OLD | NEW |