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

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

Issue 2592243002: Perform direct routing of mouse events when the pointer is locked. (Closed)
Patch Set: Created 4 years 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 1943 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 } 1954 }
1955 1955
1956 bool WebContentsImpl::HasMouseLock(RenderWidgetHostImpl* render_widget_host) { 1956 bool WebContentsImpl::HasMouseLock(RenderWidgetHostImpl* render_widget_host) {
1957 // To verify if the mouse is locked, the mouse_lock_widget_ needs to be 1957 // To verify if the mouse is locked, the mouse_lock_widget_ needs to be
1958 // assigned to the widget that requested the mouse lock, and the top-level 1958 // assigned to the widget that requested the mouse lock, and the top-level
1959 // platform RenderWidgetHostView needs to hold the mouse lock from the OS. 1959 // platform RenderWidgetHostView needs to hold the mouse lock from the OS.
1960 return mouse_lock_widget_ == render_widget_host && 1960 return mouse_lock_widget_ == render_widget_host &&
1961 GetTopLevelRenderWidgetHostView()->IsMouseLocked(); 1961 GetTopLevelRenderWidgetHostView()->IsMouseLocked();
1962 } 1962 }
1963 1963
1964 RenderWidgetHostImpl* WebContentsImpl::MouseLockWidget() {
1965 if (GetTopLevelRenderWidgetHostView()->IsMouseLocked())
1966 return mouse_lock_widget_;
1967
1968 return nullptr;
1969 }
1970
1964 void WebContentsImpl::ForwardCompositorProto( 1971 void WebContentsImpl::ForwardCompositorProto(
1965 RenderWidgetHostImpl* render_widget_host, 1972 RenderWidgetHostImpl* render_widget_host,
1966 const std::vector<uint8_t>& proto) { 1973 const std::vector<uint8_t>& proto) {
1967 if (delegate_) 1974 if (delegate_)
1968 delegate_->ForwardCompositorProto(render_widget_host, proto); 1975 delegate_->ForwardCompositorProto(render_widget_host, proto);
1969 } 1976 }
1970 1977
1971 void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) { 1978 void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) {
1972 if (visible && !GetOuterWebContents()->IsHidden()) 1979 if (visible && !GetOuterWebContents()->IsHidden())
1973 WasShown(); 1980 WasShown();
(...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after
5332 GetMainFrame()->AddMessageToConsole( 5339 GetMainFrame()->AddMessageToConsole(
5333 content::CONSOLE_MESSAGE_LEVEL_WARNING, 5340 content::CONSOLE_MESSAGE_LEVEL_WARNING,
5334 base::StringPrintf("This site does not have a valid SSL " 5341 base::StringPrintf("This site does not have a valid SSL "
5335 "certificate! Without SSL, your site's and " 5342 "certificate! Without SSL, your site's and "
5336 "visitors' data is vulnerable to theft and " 5343 "visitors' data is vulnerable to theft and "
5337 "tampering. Get a valid SSL certificate before" 5344 "tampering. Get a valid SSL certificate before"
5338 " releasing your website to the public.")); 5345 " releasing your website to the public."));
5339 } 5346 }
5340 5347
5341 } // namespace content 5348 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698