| 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 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3460 | 3460 |
| 3461 if (top_data_source) { | 3461 if (top_data_source) { |
| 3462 NavigationState* state = NavigationState::FromDataSource(top_data_source); | 3462 NavigationState* state = NavigationState::FromDataSource(top_data_source); |
| 3463 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) | 3463 if (state && request.targetType() == WebURLRequest::TargetIsPrefetch) |
| 3464 state->set_was_prefetcher(true); | 3464 state->set_was_prefetcher(true); |
| 3465 } | 3465 } |
| 3466 | 3466 |
| 3467 request.setRequestorID(routing_id_); | 3467 request.setRequestorID(routing_id_); |
| 3468 request.setHasUserGesture(frame->isProcessingUserGesture()); | 3468 request.setHasUserGesture(frame->isProcessingUserGesture()); |
| 3469 | 3469 |
| 3470 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoReferrers)) | 3470 if (!renderer_preferences_.enable_referrers) |
| 3471 request.clearHTTPHeaderField("Referer"); | 3471 request.clearHTTPHeaderField("Referer"); |
| 3472 | 3472 |
| 3473 // Temporary metrics, see site_isolation_metrics.h | 3473 // Temporary metrics, see site_isolation_metrics.h |
| 3474 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); | 3474 SiteIsolationMetrics::AddRequest(identifier, request.targetType()); |
| 3475 } | 3475 } |
| 3476 | 3476 |
| 3477 void RenderView::didReceiveResponse( | 3477 void RenderView::didReceiveResponse( |
| 3478 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { | 3478 WebFrame* frame, unsigned identifier, const WebURLResponse& response) { |
| 3479 | 3479 |
| 3480 // Temporary metrics, see site_isolation_metrics.h | 3480 // Temporary metrics, see site_isolation_metrics.h |
| (...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5373 const webkit_glue::CustomContextMenuContext& custom_context) { | 5373 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5374 if (custom_context.is_pepper_menu) | 5374 if (custom_context.is_pepper_menu) |
| 5375 pepper_delegate_.OnContextMenuClosed(custom_context); | 5375 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5376 else | 5376 else |
| 5377 context_menu_node_.reset(); | 5377 context_menu_node_.reset(); |
| 5378 } | 5378 } |
| 5379 | 5379 |
| 5380 void RenderView::OnNetworkStateChanged(bool online) { | 5380 void RenderView::OnNetworkStateChanged(bool online) { |
| 5381 WebNetworkStateNotifier::setOnLine(online); | 5381 WebNetworkStateNotifier::setOnLine(online); |
| 5382 } | 5382 } |
| OLD | NEW |