| 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 1355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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() { | 1374 void WebContentsImpl::DispatchBeforeUnload() { |
| 1375 bool for_cross_site_transition = false; | 1375 bool for_cross_site_transition = false; |
| 1376 GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition); | 1376 GetMainFrame()->DispatchBeforeUnload(for_cross_site_transition, false); |
| 1377 } | 1377 } |
| 1378 | 1378 |
| 1379 void WebContentsImpl::AttachToOuterWebContentsFrame( | 1379 void WebContentsImpl::AttachToOuterWebContentsFrame( |
| 1380 WebContents* outer_web_contents, | 1380 WebContents* outer_web_contents, |
| 1381 RenderFrameHost* outer_contents_frame) { | 1381 RenderFrameHost* outer_contents_frame) { |
| 1382 CHECK(BrowserPluginGuestMode::UseCrossProcessFramesForGuests()); | 1382 CHECK(BrowserPluginGuestMode::UseCrossProcessFramesForGuests()); |
| 1383 RenderFrameHostManager* render_manager = GetRenderManager(); | 1383 RenderFrameHostManager* render_manager = GetRenderManager(); |
| 1384 | 1384 |
| 1385 // When the WebContents being initialized has an opener, the browser side | 1385 // When the WebContents being initialized has an opener, the browser side |
| 1386 // Render{View,Frame}Host must be initialized and the RenderWidgetHostView | 1386 // Render{View,Frame}Host must be initialized and the RenderWidgetHostView |
| (...skipping 3676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5063 for (RenderViewHost* render_view_host : render_view_host_set) | 5063 for (RenderViewHost* render_view_host : render_view_host_set) |
| 5064 render_view_host->OnWebkitPreferencesChanged(); | 5064 render_view_host->OnWebkitPreferencesChanged(); |
| 5065 } | 5065 } |
| 5066 | 5066 |
| 5067 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( | 5067 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( |
| 5068 JavaScriptDialogManager* dialog_manager) { | 5068 JavaScriptDialogManager* dialog_manager) { |
| 5069 dialog_manager_ = dialog_manager; | 5069 dialog_manager_ = dialog_manager; |
| 5070 } | 5070 } |
| 5071 | 5071 |
| 5072 } // namespace content | 5072 } // namespace content |
| OLD | NEW |