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 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 4965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4976 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || | 4976 (cumulative_bindings & BINDINGS_POLICY_WEB_UI) || |
4977 url.SchemeIs(kViewSourceScheme) || | 4977 url.SchemeIs(kViewSourceScheme) || |
4978 (frame_->isViewSourceModeEnabled() && | 4978 (frame_->isViewSourceModeEnabled() && |
4979 info.navigationType != blink::WebNavigationTypeReload); | 4979 info.navigationType != blink::WebNavigationTypeReload); |
4980 | 4980 |
4981 if (!should_fork && url.SchemeIs(url::kFileScheme)) { | 4981 if (!should_fork && url.SchemeIs(url::kFileScheme)) { |
4982 // Fork non-file to file opens. Check the opener URL if this is the | 4982 // Fork non-file to file opens. Check the opener URL if this is the |
4983 // initial navigation in a newly opened window. | 4983 // initial navigation in a newly opened window. |
4984 GURL source_url(old_url); | 4984 GURL source_url(old_url); |
4985 if (is_initial_navigation && source_url.is_empty() && frame_->opener()) | 4985 if (is_initial_navigation && source_url.is_empty() && frame_->opener()) |
4986 source_url = frame_->opener()->top()->document().url(); | 4986 source_url = frame_->opener()->top()->document().url(); |
Charlie Reis
2016/07/14 21:16:47
Do we gain much by having the opener check at all?
Tom Sepez
2016/07/14 21:27:59
Done.
| |
4987 DCHECK(!source_url.is_empty()); | |
4988 should_fork = !source_url.SchemeIs(url::kFileScheme); | 4987 should_fork = !source_url.SchemeIs(url::kFileScheme); |
4989 } | 4988 } |
4990 | 4989 |
4991 if (!should_fork) { | 4990 if (!should_fork) { |
4992 // Give the embedder a chance. | 4991 // Give the embedder a chance. |
4993 should_fork = GetContentClient()->renderer()->ShouldFork( | 4992 should_fork = GetContentClient()->renderer()->ShouldFork( |
4994 frame_, url, info.urlRequest.httpMethod().utf8(), | 4993 frame_, url, info.urlRequest.httpMethod().utf8(), |
4995 is_initial_navigation, is_redirect, &send_referrer); | 4994 is_initial_navigation, is_redirect, &send_referrer); |
4996 } | 4995 } |
4997 | 4996 |
(...skipping 1331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6329 // event target. Potentially a Pepper plugin will receive the event. | 6328 // event target. Potentially a Pepper plugin will receive the event. |
6330 // In order to tell whether a plugin gets the last mouse event and which it | 6329 // In order to tell whether a plugin gets the last mouse event and which it |
6331 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6330 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6332 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6331 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6333 // |pepper_last_mouse_event_target_|. | 6332 // |pepper_last_mouse_event_target_|. |
6334 pepper_last_mouse_event_target_ = nullptr; | 6333 pepper_last_mouse_event_target_ = nullptr; |
6335 #endif | 6334 #endif |
6336 } | 6335 } |
6337 | 6336 |
6338 } // namespace content | 6337 } // namespace content |
OLD | NEW |