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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 } | 1365 } |
1366 } | 1366 } |
1367 | 1367 |
1368 bool WebContentsImpl::NeedToFireBeforeUnload() { | 1368 bool WebContentsImpl::NeedToFireBeforeUnload() { |
1369 // TODO(creis): Should we fire even for interstitial pages? | 1369 // TODO(creis): Should we fire even for interstitial pages? |
1370 return WillNotifyDisconnection() && !ShowingInterstitialPage() && | 1370 return WillNotifyDisconnection() && !ShowingInterstitialPage() && |
1371 !GetRenderViewHost()->SuddenTerminationAllowed(); | 1371 !GetRenderViewHost()->SuddenTerminationAllowed(); |
1372 } | 1372 } |
1373 | 1373 |
1374 void WebContentsImpl::DispatchBeforeUnload(bool for_cross_site_transition) { | 1374 void WebContentsImpl::DispatchBeforeUnload(bool for_cross_site_transition) { |
1375 GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition); | 1375 GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition, false); |
1376 } | 1376 } |
1377 | 1377 |
1378 void WebContentsImpl::AttachToOuterWebContentsFrame( | 1378 void WebContentsImpl::AttachToOuterWebContentsFrame( |
1379 WebContents* outer_web_contents, | 1379 WebContents* outer_web_contents, |
1380 RenderFrameHost* outer_contents_frame) { | 1380 RenderFrameHost* outer_contents_frame) { |
1381 CHECK(BrowserPluginGuestMode::UseCrossProcessFramesForGuests()); | 1381 CHECK(BrowserPluginGuestMode::UseCrossProcessFramesForGuests()); |
1382 RenderFrameHostManager* render_manager = GetRenderManager(); | 1382 RenderFrameHostManager* render_manager = GetRenderManager(); |
1383 | 1383 |
1384 // When the WebContents being initialized has an opener, the browser side | 1384 // When the WebContents being initialized has an opener, the browser side |
1385 // Render{View,Frame}Host must be initialized and the RenderWidgetHostView | 1385 // Render{View,Frame}Host must be initialized and the RenderWidgetHostView |
(...skipping 3629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5015 for (RenderViewHost* render_view_host : render_view_host_set) | 5015 for (RenderViewHost* render_view_host : render_view_host_set) |
5016 render_view_host->OnWebkitPreferencesChanged(); | 5016 render_view_host->OnWebkitPreferencesChanged(); |
5017 } | 5017 } |
5018 | 5018 |
5019 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5019 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
5020 JavaScriptDialogManager* dialog_manager) { | 5020 JavaScriptDialogManager* dialog_manager) { |
5021 dialog_manager_ = dialog_manager; | 5021 dialog_manager_ = dialog_manager; |
5022 } | 5022 } |
5023 | 5023 |
5024 } // namespace content | 5024 } // namespace content |
OLD | NEW |