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

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

Issue 2949593003: Move navigation-induced hiding of form-validation-bubble to the browser process. (Closed)
Patch Set: Remove now unnecessary call from WebContentsImpl::RenderViewTerminated to delegate_->HideValidation… Created 3 years, 6 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 | « no previous file | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
980 RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const { 980 RenderViewHostImpl* WebContentsImpl::GetRenderViewHost() const {
981 return GetRenderManager()->current_host(); 981 return GetRenderManager()->current_host();
982 } 982 }
983 983
984 void WebContentsImpl::CancelActiveAndPendingDialogs() { 984 void WebContentsImpl::CancelActiveAndPendingDialogs() {
985 if (dialog_manager_) { 985 if (dialog_manager_) {
986 dialog_manager_->CancelDialogs(this, /*reset_state=*/false); 986 dialog_manager_->CancelDialogs(this, /*reset_state=*/false);
987 } 987 }
988 if (browser_plugin_embedder_) 988 if (browser_plugin_embedder_)
989 browser_plugin_embedder_->CancelGuestDialogs(); 989 browser_plugin_embedder_->CancelGuestDialogs();
990 if (delegate_)
991 delegate_->HideValidationMessage(this);
990 } 992 }
991 993
992 void WebContentsImpl::ClosePage() { 994 void WebContentsImpl::ClosePage() {
993 GetRenderViewHost()->ClosePage(); 995 GetRenderViewHost()->ClosePage();
994 } 996 }
995 997
996 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const { 998 RenderWidgetHostView* WebContentsImpl::GetRenderWidgetHostView() const {
997 return GetRenderManager()->GetRenderWidgetHostView(); 999 return GetRenderManager()->GetRenderWidgetHostView();
998 } 1000 }
999 1001
(...skipping 3668 matching lines...) Expand 10 before | Expand all | Expand 10 after
4668 } 4670 }
4669 4671
4670 // Ensure fullscreen mode is exited in the |delegate_| since a crashed 4672 // Ensure fullscreen mode is exited in the |delegate_| since a crashed
4671 // renderer may not have made a clean exit. 4673 // renderer may not have made a clean exit.
4672 if (IsFullscreenForCurrentTab()) 4674 if (IsFullscreenForCurrentTab())
4673 ExitFullscreenMode(false); 4675 ExitFullscreenMode(false);
4674 4676
4675 // Cancel any visible dialogs so they are not left dangling over the sad tab. 4677 // Cancel any visible dialogs so they are not left dangling over the sad tab.
4676 CancelActiveAndPendingDialogs(); 4678 CancelActiveAndPendingDialogs();
4677 4679
4678 if (delegate_)
4679 delegate_->HideValidationMessage(this);
4680
4681 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID()); 4680 audio_stream_monitor_.RenderProcessGone(rvh->GetProcess()->GetID());
4682 4681
4683 // Reset the loading progress. TODO(avi): What does it mean to have a 4682 // Reset the loading progress. TODO(avi): What does it mean to have a
4684 // "renderer crash" when there is more than one renderer process serving a 4683 // "renderer crash" when there is more than one renderer process serving a
4685 // webpage? Once this function is called at a more granular frame level, we 4684 // webpage? Once this function is called at a more granular frame level, we
4686 // probably will need to more granularly reset the state here. 4685 // probably will need to more granularly reset the state here.
4687 ResetLoadProgressState(); 4686 ResetLoadProgressState();
4688 NotifyDisconnected(); 4687 NotifyDisconnected();
4689 SetIsCrashed(status, error_code); 4688 SetIsCrashed(status, error_code);
4690 4689
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
5745 new_root->SetOriginalOpener(opener->frame_tree()->root()); 5744 new_root->SetOriginalOpener(opener->frame_tree()->root());
5746 5745
5747 if (!opener_suppressed) { 5746 if (!opener_suppressed) {
5748 new_root->SetOpener(opener); 5747 new_root->SetOpener(opener);
5749 created_with_opener_ = true; 5748 created_with_opener_ = true;
5750 } 5749 }
5751 } 5750 }
5752 } 5751 }
5753 5752
5754 } // namespace content 5753 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698