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 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3537 | 3537 |
3538 void WebContentsImpl::DidNavigateAnyFramePostCommit( | 3538 void WebContentsImpl::DidNavigateAnyFramePostCommit( |
3539 RenderFrameHostImpl* render_frame_host, | 3539 RenderFrameHostImpl* render_frame_host, |
3540 const LoadCommittedDetails& details, | 3540 const LoadCommittedDetails& details, |
3541 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) { | 3541 const FrameHostMsg_DidCommitProvisionalLoad_Params& params) { |
3542 // Now that something has committed, we don't need to track whether the | 3542 // Now that something has committed, we don't need to track whether the |
3543 // initial page has been accessed. | 3543 // initial page has been accessed. |
3544 has_accessed_initial_document_ = false; | 3544 has_accessed_initial_document_ = false; |
3545 | 3545 |
3546 // If we navigate off the page, close all JavaScript dialogs. | 3546 // If we navigate off the page, close all JavaScript dialogs. |
3547 if (!details.is_in_page) | 3547 if (!details.is_same_document) |
3548 CancelActiveAndPendingDialogs(); | 3548 CancelActiveAndPendingDialogs(); |
3549 | 3549 |
3550 // If this is a user-initiated navigation, start allowing JavaScript dialogs | 3550 // If this is a user-initiated navigation, start allowing JavaScript dialogs |
3551 // again. | 3551 // again. |
3552 if (params.gesture == NavigationGestureUser && dialog_manager_) { | 3552 if (params.gesture == NavigationGestureUser && dialog_manager_) { |
3553 dialog_manager_->CancelDialogs(this, /*reset_state=*/true); | 3553 dialog_manager_->CancelDialogs(this, /*reset_state=*/true); |
3554 } | 3554 } |
3555 } | 3555 } |
3556 | 3556 |
3557 void WebContentsImpl::SetMainFrameMimeType(const std::string& mime_type) { | 3557 void WebContentsImpl::SetMainFrameMimeType(const std::string& mime_type) { |
(...skipping 1914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5472 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); | 5472 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); |
5473 if (!render_view_host) | 5473 if (!render_view_host) |
5474 continue; | 5474 continue; |
5475 render_view_host_set.insert(render_view_host); | 5475 render_view_host_set.insert(render_view_host); |
5476 } | 5476 } |
5477 for (RenderViewHost* render_view_host : render_view_host_set) | 5477 for (RenderViewHost* render_view_host : render_view_host_set) |
5478 render_view_host->OnWebkitPreferencesChanged(); | 5478 render_view_host->OnWebkitPreferencesChanged(); |
5479 } | 5479 } |
5480 | 5480 |
5481 } // namespace content | 5481 } // namespace content |
OLD | NEW |