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 5126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5137 frame_->parent()) { | 5137 frame_->parent()) { |
5138 // Check whether the browser has a history item for this frame that isn't | 5138 // Check whether the browser has a history item for this frame that isn't |
5139 // just staying at the initial about:blank document. | 5139 // just staying at the initial about:blank document. |
5140 bool should_ask_browser = false; | 5140 bool should_ask_browser = false; |
5141 RenderFrameImpl* parent = RenderFrameImpl::FromWebFrame(frame_->parent()); | 5141 RenderFrameImpl* parent = RenderFrameImpl::FromWebFrame(frame_->parent()); |
5142 const auto& iter = parent->history_subframe_unique_names_.find( | 5142 const auto& iter = parent->history_subframe_unique_names_.find( |
5143 frame_->uniqueName().utf8()); | 5143 frame_->uniqueName().utf8()); |
5144 if (iter != parent->history_subframe_unique_names_.end()) { | 5144 if (iter != parent->history_subframe_unique_names_.end()) { |
5145 bool history_item_is_about_blank = iter->second; | 5145 bool history_item_is_about_blank = iter->second; |
5146 should_ask_browser = | 5146 should_ask_browser = |
5147 !history_item_is_about_blank || url != GURL(url::kAboutBlankURL); | 5147 !history_item_is_about_blank || url != url::kAboutBlankURL; |
5148 parent->history_subframe_unique_names_.erase(frame_->uniqueName().utf8()); | 5148 parent->history_subframe_unique_names_.erase(frame_->uniqueName().utf8()); |
5149 } | 5149 } |
5150 | 5150 |
5151 if (should_ask_browser) { | 5151 if (should_ask_browser) { |
5152 // Don't do this if |info| also says it is a client redirect, in which | 5152 // Don't do this if |info| also says it is a client redirect, in which |
5153 // case JavaScript on the page is trying to interrupt the history | 5153 // case JavaScript on the page is trying to interrupt the history |
5154 // navigation. | 5154 // navigation. |
5155 if (!info.isClientRedirect) { | 5155 if (!info.isClientRedirect) { |
5156 OpenURL(url, IsHttpPost(info.urlRequest), | 5156 OpenURL(url, IsHttpPost(info.urlRequest), |
5157 GetRequestBodyForWebURLRequest(info.urlRequest), | 5157 GetRequestBodyForWebURLRequest(info.urlRequest), |
(...skipping 1428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6586 // event target. Potentially a Pepper plugin will receive the event. | 6586 // event target. Potentially a Pepper plugin will receive the event. |
6587 // In order to tell whether a plugin gets the last mouse event and which it | 6587 // In order to tell whether a plugin gets the last mouse event and which it |
6588 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6588 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6589 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6589 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6590 // |pepper_last_mouse_event_target_|. | 6590 // |pepper_last_mouse_event_target_|. |
6591 pepper_last_mouse_event_target_ = nullptr; | 6591 pepper_last_mouse_event_target_ = nullptr; |
6592 #endif | 6592 #endif |
6593 } | 6593 } |
6594 | 6594 |
6595 } // namespace content | 6595 } // namespace content |
OLD | NEW |