Chromium Code Reviews| 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 "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 3609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3620 WebDataSource* data_source = | 3620 WebDataSource* data_source = |
| 3621 provisional_data_source ? provisional_data_source : top_data_source; | 3621 provisional_data_source ? provisional_data_source : top_data_source; |
| 3622 | 3622 |
| 3623 // If the request is for an extension resource, check whether it should be | 3623 // If the request is for an extension resource, check whether it should be |
| 3624 // allowed. If not allowed, we reset the URL to something invalid to prevent | 3624 // allowed. If not allowed, we reset the URL to something invalid to prevent |
| 3625 // the request and cause an error. | 3625 // the request and cause an error. |
| 3626 GURL request_url(request.url()); | 3626 GURL request_url(request.url()); |
| 3627 if (request_url.SchemeIs(chrome::kExtensionScheme) && | 3627 if (request_url.SchemeIs(chrome::kExtensionScheme) && |
| 3628 !ExtensionResourceRequestPolicy::CanRequestResource( | 3628 !ExtensionResourceRequestPolicy::CanRequestResource( |
| 3629 request_url, | 3629 request_url, |
| 3630 GURL(frame->url()), | 3630 GURL(frame->securityOrigin().toString()), |
|
Aaron Boodman
2011/02/10 05:25:50
In the case of iframes that are dynamically create
| |
| 3631 render_thread_->GetExtensions())) { | 3631 render_thread_->GetExtensions())) { |
| 3632 request.setURL(WebURL(GURL("chrome-extension://invalid/"))); | 3632 request.setURL(WebURL(GURL("chrome-extension://invalid/"))); |
| 3633 } | 3633 } |
| 3634 | 3634 |
| 3635 if (data_source) { | 3635 if (data_source) { |
| 3636 NavigationState* state = NavigationState::FromDataSource(data_source); | 3636 NavigationState* state = NavigationState::FromDataSource(data_source); |
| 3637 if (state && state->is_cache_policy_override_set()) | 3637 if (state && state->is_cache_policy_override_set()) |
| 3638 request.setCachePolicy(state->cache_policy_override()); | 3638 request.setCachePolicy(state->cache_policy_override()); |
| 3639 } | 3639 } |
| 3640 | 3640 |
| (...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5773 } | 5773 } |
| 5774 } | 5774 } |
| 5775 | 5775 |
| 5776 void RenderView::OnContextMenuClosed( | 5776 void RenderView::OnContextMenuClosed( |
| 5777 const webkit_glue::CustomContextMenuContext& custom_context) { | 5777 const webkit_glue::CustomContextMenuContext& custom_context) { |
| 5778 if (custom_context.is_pepper_menu) | 5778 if (custom_context.is_pepper_menu) |
| 5779 pepper_delegate_.OnContextMenuClosed(custom_context); | 5779 pepper_delegate_.OnContextMenuClosed(custom_context); |
| 5780 else | 5780 else |
| 5781 context_menu_node_.reset(); | 5781 context_menu_node_.reset(); |
| 5782 } | 5782 } |
| OLD | NEW |