OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <cmath> | 9 #include <cmath> |
10 #include <utility> | 10 #include <utility> |
(...skipping 4166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4177 view_->CloseTabAfterEventTracking(); | 4177 view_->CloseTabAfterEventTracking(); |
4178 return; | 4178 return; |
4179 } | 4179 } |
4180 #endif | 4180 #endif |
4181 | 4181 |
4182 // Ignore this if it comes from a RenderViewHost that we aren't showing. | 4182 // Ignore this if it comes from a RenderViewHost that we aren't showing. |
4183 if (delegate_ && rvh == GetRenderViewHost()) | 4183 if (delegate_ && rvh == GetRenderViewHost()) |
4184 delegate_->CloseContents(this); | 4184 delegate_->CloseContents(this); |
4185 } | 4185 } |
4186 | 4186 |
4187 void WebContentsImpl::SwappedOut(RenderFrameHost* rfh) { | |
4188 if (delegate_ && rfh->GetRenderViewHost() == GetRenderViewHost()) | |
4189 delegate_->SwappedOut(this); | |
4190 } | |
4191 | |
4192 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { | 4187 void WebContentsImpl::RequestMove(const gfx::Rect& new_bounds) { |
4193 if (delegate_ && delegate_->IsPopupOrPanel(this)) | 4188 if (delegate_ && delegate_->IsPopupOrPanel(this)) |
4194 delegate_->MoveContents(this, new_bounds); | 4189 delegate_->MoveContents(this, new_bounds); |
4195 } | 4190 } |
4196 | 4191 |
4197 void WebContentsImpl::DidStartLoading(FrameTreeNode* frame_tree_node, | 4192 void WebContentsImpl::DidStartLoading(FrameTreeNode* frame_tree_node, |
4198 bool to_different_document) { | 4193 bool to_different_document) { |
4199 LoadingStateChanged(to_different_document, false, nullptr); | 4194 LoadingStateChanged(to_different_document, false, nullptr); |
4200 | 4195 |
4201 // Notify accessibility that the user is navigating away from the | 4196 // Notify accessibility that the user is navigating away from the |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4963 for (RenderViewHost* render_view_host : render_view_host_set) | 4958 for (RenderViewHost* render_view_host : render_view_host_set) |
4964 render_view_host->OnWebkitPreferencesChanged(); | 4959 render_view_host->OnWebkitPreferencesChanged(); |
4965 } | 4960 } |
4966 | 4961 |
4967 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 4962 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
4968 JavaScriptDialogManager* dialog_manager) { | 4963 JavaScriptDialogManager* dialog_manager) { |
4969 dialog_manager_ = dialog_manager; | 4964 dialog_manager_ = dialog_manager; |
4970 } | 4965 } |
4971 | 4966 |
4972 } // namespace content | 4967 } // namespace content |
OLD | NEW |