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

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

Issue 1849343004: Remove RenderFrameHostImplState and convert it to boolean. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nits. Created 4 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
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3879 matching lines...) Expand 10 before | Expand all | Expand 10 after
3890 void WebContentsImpl::RunBeforeUnloadConfirm( 3890 void WebContentsImpl::RunBeforeUnloadConfirm(
3891 RenderFrameHost* render_frame_host, 3891 RenderFrameHost* render_frame_host,
3892 bool is_reload, 3892 bool is_reload,
3893 IPC::Message* reply_msg) { 3893 IPC::Message* reply_msg) {
3894 RenderFrameHostImpl* rfhi = 3894 RenderFrameHostImpl* rfhi =
3895 static_cast<RenderFrameHostImpl*>(render_frame_host); 3895 static_cast<RenderFrameHostImpl*>(render_frame_host);
3896 if (delegate_) 3896 if (delegate_)
3897 delegate_->WillRunBeforeUnloadConfirm(); 3897 delegate_->WillRunBeforeUnloadConfirm();
3898 3898
3899 bool suppress_this_message = 3899 bool suppress_this_message =
3900 rfhi->rfh_state() != RenderFrameHostImpl::STATE_DEFAULT || 3900 !rfhi->is_active() ||
3901 ShowingInterstitialPage() || !delegate_ || 3901 ShowingInterstitialPage() || !delegate_ ||
3902 delegate_->ShouldSuppressDialogs(this) || 3902 delegate_->ShouldSuppressDialogs(this) ||
3903 !delegate_->GetJavaScriptDialogManager(this); 3903 !delegate_->GetJavaScriptDialogManager(this);
3904 if (suppress_this_message) { 3904 if (suppress_this_message) {
3905 rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true); 3905 rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true);
3906 return; 3906 return;
3907 } 3907 }
3908 3908
3909 is_showing_before_unload_dialog_ = true; 3909 is_showing_before_unload_dialog_ = true;
3910 dialog_manager_ = delegate_->GetJavaScriptDialogManager(this); 3910 dialog_manager_ = delegate_->GetJavaScriptDialogManager(this);
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
4838 else 4838 else
4839 WasHidden(); 4839 WasHidden();
4840 } 4840 }
4841 4841
4842 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 4842 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
4843 JavaScriptDialogManager* dialog_manager) { 4843 JavaScriptDialogManager* dialog_manager) {
4844 dialog_manager_ = dialog_manager; 4844 dialog_manager_ = dialog_manager;
4845 } 4845 }
4846 4846
4847 } // namespace content 4847 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/site_per_process_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698