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

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

Issue 2437213002: Fix crash where a pending pointer lock would trigger a CHECK. (Closed)
Patch Set: override Created 4 years, 1 month 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 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 if (delegate_ && delegate_->EmbedsFullscreenWidget()) 1712 if (delegate_ && delegate_->EmbedsFullscreenWidget())
1713 delegate_->ExitFullscreenModeForTab(this); 1713 delegate_->ExitFullscreenModeForTab(this);
1714 for (auto& observer : observers_) 1714 for (auto& observer : observers_)
1715 observer.DidDestroyFullscreenWidget(); 1715 observer.DidDestroyFullscreenWidget();
1716 fullscreen_widget_process_id_ = ChildProcessHost::kInvalidUniqueID; 1716 fullscreen_widget_process_id_ = ChildProcessHost::kInvalidUniqueID;
1717 fullscreen_widget_routing_id_ = MSG_ROUTING_NONE; 1717 fullscreen_widget_routing_id_ = MSG_ROUTING_NONE;
1718 if (fullscreen_widget_had_focus_at_shutdown_) 1718 if (fullscreen_widget_had_focus_at_shutdown_)
1719 view_->RestoreFocus(); 1719 view_->RestoreFocus();
1720 } 1720 }
1721 1721
1722 CHECK(mouse_lock_widget_ != render_widget_host); 1722 if (mouse_lock_widget_)
1723 LostMouseLock(mouse_lock_widget_);
1723 } 1724 }
1724 1725
1725 void WebContentsImpl::RenderWidgetGotFocus( 1726 void WebContentsImpl::RenderWidgetGotFocus(
1726 RenderWidgetHostImpl* render_widget_host) { 1727 RenderWidgetHostImpl* render_widget_host) {
1727 // Notify the observers if an embedded fullscreen widget was focused. 1728 // Notify the observers if an embedded fullscreen widget was focused.
1728 if (delegate_ && render_widget_host && delegate_->EmbedsFullscreenWidget() && 1729 if (delegate_ && render_widget_host && delegate_->EmbedsFullscreenWidget() &&
1729 render_widget_host->GetView() == GetFullscreenRenderWidgetHostView()) { 1730 render_widget_host->GetView() == GetFullscreenRenderWidgetHostView()) {
1730 NotifyWebContentsFocused(); 1731 NotifyWebContentsFocused();
1731 } 1732 }
1732 } 1733 }
(...skipping 3455 matching lines...) Expand 10 before | Expand all | Expand 10 after
5188 dialog_manager_ = dialog_manager; 5189 dialog_manager_ = dialog_manager;
5189 } 5190 }
5190 5191
5191 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5192 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5192 auto it = binding_sets_.find(interface_name); 5193 auto it = binding_sets_.find(interface_name);
5193 if (it != binding_sets_.end()) 5194 if (it != binding_sets_.end())
5194 binding_sets_.erase(it); 5195 binding_sets_.erase(it);
5195 } 5196 }
5196 5197
5197 } // namespace content 5198 } // 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