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

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: 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
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 3867 matching lines...) Expand 10 before | Expand all | Expand 10 after
3878 void WebContentsImpl::RunBeforeUnloadConfirm( 3878 void WebContentsImpl::RunBeforeUnloadConfirm(
3879 RenderFrameHost* render_frame_host, 3879 RenderFrameHost* render_frame_host,
3880 bool is_reload, 3880 bool is_reload,
3881 IPC::Message* reply_msg) { 3881 IPC::Message* reply_msg) {
3882 RenderFrameHostImpl* rfhi = 3882 RenderFrameHostImpl* rfhi =
3883 static_cast<RenderFrameHostImpl*>(render_frame_host); 3883 static_cast<RenderFrameHostImpl*>(render_frame_host);
3884 if (delegate_) 3884 if (delegate_)
3885 delegate_->WillRunBeforeUnloadConfirm(); 3885 delegate_->WillRunBeforeUnloadConfirm();
3886 3886
3887 bool suppress_this_message = 3887 bool suppress_this_message =
3888 rfhi->rfh_state() != RenderFrameHostImpl::STATE_DEFAULT || 3888 !rfhi->is_active() ||
3889 ShowingInterstitialPage() || !delegate_ || 3889 ShowingInterstitialPage() || !delegate_ ||
3890 delegate_->ShouldSuppressDialogs(this) || 3890 delegate_->ShouldSuppressDialogs(this) ||
3891 !delegate_->GetJavaScriptDialogManager(this); 3891 !delegate_->GetJavaScriptDialogManager(this);
3892 if (suppress_this_message) { 3892 if (suppress_this_message) {
3893 rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true); 3893 rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true);
3894 return; 3894 return;
3895 } 3895 }
3896 3896
3897 is_showing_before_unload_dialog_ = true; 3897 is_showing_before_unload_dialog_ = true;
3898 dialog_manager_ = delegate_->GetJavaScriptDialogManager(this); 3898 dialog_manager_ = delegate_->GetJavaScriptDialogManager(this);
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
4825 else 4825 else
4826 WasHidden(); 4826 WasHidden();
4827 } 4827 }
4828 4828
4829 void WebContentsImpl::SetJavaScriptDialogManagerForTesting( 4829 void WebContentsImpl::SetJavaScriptDialogManagerForTesting(
4830 JavaScriptDialogManager* dialog_manager) { 4830 JavaScriptDialogManager* dialog_manager) {
4831 dialog_manager_ = dialog_manager; 4831 dialog_manager_ = dialog_manager;
4832 } 4832 }
4833 4833
4834 } // namespace content 4834 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698