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

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

Issue 2763953003: Revert of Only release the pointer lock when the RenderWidgetHost being destroyed (Closed)
Patch Set: Created 3 years, 9 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/pointer_lock_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 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 if (delegate_ && delegate_->EmbedsFullscreenWidget()) 1724 if (delegate_ && delegate_->EmbedsFullscreenWidget())
1725 delegate_->ExitFullscreenModeForTab(this); 1725 delegate_->ExitFullscreenModeForTab(this);
1726 for (auto& observer : observers_) 1726 for (auto& observer : observers_)
1727 observer.DidDestroyFullscreenWidget(); 1727 observer.DidDestroyFullscreenWidget();
1728 fullscreen_widget_process_id_ = ChildProcessHost::kInvalidUniqueID; 1728 fullscreen_widget_process_id_ = ChildProcessHost::kInvalidUniqueID;
1729 fullscreen_widget_routing_id_ = MSG_ROUTING_NONE; 1729 fullscreen_widget_routing_id_ = MSG_ROUTING_NONE;
1730 if (fullscreen_widget_had_focus_at_shutdown_) 1730 if (fullscreen_widget_had_focus_at_shutdown_)
1731 view_->RestoreFocus(); 1731 view_->RestoreFocus();
1732 } 1732 }
1733 1733
1734 if (render_widget_host == mouse_lock_widget_) 1734 if (mouse_lock_widget_)
1735 LostMouseLock(mouse_lock_widget_); 1735 LostMouseLock(mouse_lock_widget_);
1736 } 1736 }
1737 1737
1738 void WebContentsImpl::RenderWidgetGotFocus( 1738 void WebContentsImpl::RenderWidgetGotFocus(
1739 RenderWidgetHostImpl* render_widget_host) { 1739 RenderWidgetHostImpl* render_widget_host) {
1740 // Notify the observers if an embedded fullscreen widget was focused. 1740 // Notify the observers if an embedded fullscreen widget was focused.
1741 if (delegate_ && render_widget_host && delegate_->EmbedsFullscreenWidget() && 1741 if (delegate_ && render_widget_host && delegate_->EmbedsFullscreenWidget() &&
1742 render_widget_host->GetView() == GetFullscreenRenderWidgetHostView()) { 1742 render_widget_host->GetView() == GetFullscreenRenderWidgetHostView()) {
1743 NotifyWebContentsFocused(); 1743 NotifyWebContentsFocused();
1744 } 1744 }
(...skipping 3646 matching lines...) Expand 10 before | Expand all | Expand 10 after
5391 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host); 5391 RenderViewHost* render_view_host = RenderViewHost::From(render_widget_host);
5392 if (!render_view_host) 5392 if (!render_view_host)
5393 continue; 5393 continue;
5394 render_view_host_set.insert(render_view_host); 5394 render_view_host_set.insert(render_view_host);
5395 } 5395 }
5396 for (RenderViewHost* render_view_host : render_view_host_set) 5396 for (RenderViewHost* render_view_host : render_view_host_set)
5397 render_view_host->OnWebkitPreferencesChanged(); 5397 render_view_host->OnWebkitPreferencesChanged();
5398 } 5398 }
5399 5399
5400 } // namespace content 5400 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/pointer_lock_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698