OLD | NEW |
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 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 } | 1984 } |
1985 | 1985 |
1986 bool WebContentsImpl::HasMouseLock(RenderWidgetHostImpl* render_widget_host) { | 1986 bool WebContentsImpl::HasMouseLock(RenderWidgetHostImpl* render_widget_host) { |
1987 // To verify if the mouse is locked, the mouse_lock_widget_ needs to be | 1987 // To verify if the mouse is locked, the mouse_lock_widget_ needs to be |
1988 // assigned to the widget that requested the mouse lock, and the top-level | 1988 // assigned to the widget that requested the mouse lock, and the top-level |
1989 // platform RenderWidgetHostView needs to hold the mouse lock from the OS. | 1989 // platform RenderWidgetHostView needs to hold the mouse lock from the OS. |
1990 return mouse_lock_widget_ == render_widget_host && | 1990 return mouse_lock_widget_ == render_widget_host && |
1991 GetTopLevelRenderWidgetHostView()->IsMouseLocked(); | 1991 GetTopLevelRenderWidgetHostView()->IsMouseLocked(); |
1992 } | 1992 } |
1993 | 1993 |
| 1994 RenderWidgetHostImpl* WebContentsImpl::GetMouseLockWidget() { |
| 1995 if (GetTopLevelRenderWidgetHostView()->IsMouseLocked()) |
| 1996 return mouse_lock_widget_; |
| 1997 |
| 1998 return nullptr; |
| 1999 } |
| 2000 |
1994 void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) { | 2001 void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) { |
1995 if (visible && !GetOuterWebContents()->IsHidden()) | 2002 if (visible && !GetOuterWebContents()->IsHidden()) |
1996 WasShown(); | 2003 WasShown(); |
1997 else if (!visible) | 2004 else if (!visible) |
1998 WasHidden(); | 2005 WasHidden(); |
1999 } | 2006 } |
2000 | 2007 |
2001 void WebContentsImpl::CreateNewWindow( | 2008 void WebContentsImpl::CreateNewWindow( |
2002 SiteInstance* source_site_instance, | 2009 SiteInstance* source_site_instance, |
2003 int32_t render_view_route_id, | 2010 int32_t render_view_route_id, |
(...skipping 3407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5411 GetMainFrame()->AddMessageToConsole( | 5418 GetMainFrame()->AddMessageToConsole( |
5412 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5419 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
5413 base::StringPrintf("This site does not have a valid SSL " | 5420 base::StringPrintf("This site does not have a valid SSL " |
5414 "certificate! Without SSL, your site's and " | 5421 "certificate! Without SSL, your site's and " |
5415 "visitors' data is vulnerable to theft and " | 5422 "visitors' data is vulnerable to theft and " |
5416 "tampering. Get a valid SSL certificate before" | 5423 "tampering. Get a valid SSL certificate before" |
5417 " releasing your website to the public.")); | 5424 " releasing your website to the public.")); |
5418 } | 5425 } |
5419 | 5426 |
5420 } // namespace content | 5427 } // namespace content |
OLD | NEW |