Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2808953002: Revert of Followup comments from r460581. (Closed)
Patch Set: manual merge Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1477 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1488
1489 void WebContentsImpl::WasUnOccluded() { 1489 void WebContentsImpl::WasUnOccluded() {
1490 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) { 1490 for (RenderWidgetHostView* view : GetRenderWidgetHostViewsInTree()) {
1491 if (view) 1491 if (view)
1492 view->WasUnOccluded(); 1492 view->WasUnOccluded();
1493 } 1493 }
1494 } 1494 }
1495 1495
1496 bool WebContentsImpl::NeedToFireBeforeUnload() { 1496 bool WebContentsImpl::NeedToFireBeforeUnload() {
1497 // TODO(creis): Should we fire even for interstitial pages? 1497 // TODO(creis): Should we fire even for interstitial pages?
1498 // TODO(nasko): it's confusing that this method, per comments and tests that
1499 // depend on this behavior, needs to check unload handlers as well.
1500 return WillNotifyDisconnection() && !ShowingInterstitialPage() && 1498 return WillNotifyDisconnection() && !ShowingInterstitialPage() &&
1501 !GetRenderViewHost()->SuddenTerminationAllowed() && 1499 !GetRenderViewHost()->SuddenTerminationAllowed() &&
1502 (GetMainFrame()->ShouldDispatchBeforeUnload() || 1500 (GetMainFrame()->ShouldDispatchBeforeUnload() ||
1503 GetMainFrame()->HasUnloadHandler()); 1501 GetMainFrame()->ShouldDispatchUnload());
1504 } 1502 }
1505 1503
1506 void WebContentsImpl::DispatchBeforeUnload() { 1504 void WebContentsImpl::DispatchBeforeUnload() {
1507 bool for_cross_site_transition = false; 1505 bool for_cross_site_transition = false;
1508 GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition, false); 1506 GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition, false);
1509 } 1507 }
1510 1508
1511 void WebContentsImpl::AttachToOuterWebContentsFrame( 1509 void WebContentsImpl::AttachToOuterWebContentsFrame(
1512 WebContents* outer_web_contents, 1510 WebContents* outer_web_contents,
1513 RenderFrameHost* outer_contents_frame) { 1511 RenderFrameHost* outer_contents_frame) {
(...skipping 4005 matching lines...) Expand 10 before | Expand all | Expand 10 after
5519 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); 5517 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host);
5520 if (!render_view_host) 5518 if (!render_view_host)
5521 continue; 5519 continue;
5522 render_view_host_set.insert(render_view_host); 5520 render_view_host_set.insert(render_view_host);
5523 } 5521 }
5524 for (RenderViewHost* render_view_host : render_view_host_set) 5522 for (RenderViewHost* render_view_host : render_view_host_set)
5525 render_view_host->OnWebkitPreferencesChanged(); 5523 render_view_host->OnWebkitPreferencesChanged();
5526 } 5524 }
5527 5525
5528 } // namespace content 5526 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698