| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 bool is_form_post) { | 288 bool is_form_post) { |
| 289 if (!IsTopLevelNavigation(frame)) | 289 if (!IsTopLevelNavigation(frame)) |
| 290 return false; | 290 return false; |
| 291 | 291 |
| 292 // Navigations initiated within Webkit are not sent out to the external host | 292 // Navigations initiated within Webkit are not sent out to the external host |
| 293 // in the following cases. | 293 // in the following cases. |
| 294 // 1. The url scheme is not http/https | 294 // 1. The url scheme is not http/https |
| 295 // 2. The origin of the url and the opener is the same in which case the | 295 // 2. The origin of the url and the opener is the same in which case the |
| 296 // opener relationship is maintained. | 296 // opener relationship is maintained. |
| 297 // 3. Reloads/form submits/back forward navigations | 297 // 3. Reloads/form submits/back forward navigations |
| 298 if (!url.SchemeIs(kHttpScheme) && !url.SchemeIs(kHttpsScheme)) | 298 if (!url.SchemeIs(url::kHttpScheme) && !url.SchemeIs(url::kHttpsScheme)) |
| 299 return false; | 299 return false; |
| 300 | 300 |
| 301 if (type != blink::WebNavigationTypeReload && | 301 if (type != blink::WebNavigationTypeReload && |
| 302 type != blink::WebNavigationTypeBackForward && !is_form_post) { | 302 type != blink::WebNavigationTypeBackForward && !is_form_post) { |
| 303 // The opener relationship between the new window and the parent allows the | 303 // The opener relationship between the new window and the parent allows the |
| 304 // new window to script the parent and vice versa. This is not allowed if | 304 // new window to script the parent and vice versa. This is not allowed if |
| 305 // the origins of the two domains are different. This can be treated as a | 305 // the origins of the two domains are different. This can be treated as a |
| 306 // top level navigation and routed back to the host. | 306 // top level navigation and routed back to the host. |
| 307 blink::WebFrame* opener = frame->opener(); | 307 blink::WebFrame* opener = frame->opener(); |
| 308 if (!opener) | 308 if (!opener) |
| (...skipping 3084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3393 weak_factory_.GetWeakPtr(), | 3393 weak_factory_.GetWeakPtr(), |
| 3394 render_view_->media_player_manager_, | 3394 render_view_->media_player_manager_, |
| 3395 stream_texture_factory, | 3395 stream_texture_factory, |
| 3396 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), | 3396 RenderThreadImpl::current()->GetMediaThreadMessageLoopProxy(), |
| 3397 new RenderMediaLog()); | 3397 new RenderMediaLog()); |
| 3398 } | 3398 } |
| 3399 | 3399 |
| 3400 #endif | 3400 #endif |
| 3401 | 3401 |
| 3402 } // namespace content | 3402 } // namespace content |
| OLD | NEW |