| 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/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 void RenderViewImpl::didFocus() { | 1975 void RenderViewImpl::didFocus() { |
| 1976 // TODO(jcivelli): when https://bugs.webkit.org/show_bug.cgi?id=33389 is fixed | 1976 // TODO(jcivelli): when https://bugs.webkit.org/show_bug.cgi?id=33389 is fixed |
| 1977 // we won't have to test for user gesture anymore and we can | 1977 // we won't have to test for user gesture anymore and we can |
| 1978 // move that code back to render_widget.cc | 1978 // move that code back to render_widget.cc |
| 1979 if (WebUserGestureIndicator::isProcessingUserGesture() && | 1979 if (WebUserGestureIndicator::isProcessingUserGesture() && |
| 1980 !RenderThreadImpl::current()->layout_test_mode()) { | 1980 !RenderThreadImpl::current()->layout_test_mode()) { |
| 1981 Send(new ViewHostMsg_Focus(routing_id_)); | 1981 Send(new ViewHostMsg_Focus(routing_id_)); |
| 1982 } | 1982 } |
| 1983 } | 1983 } |
| 1984 | 1984 |
| 1985 void RenderViewImpl::didBlur() { | |
| 1986 // TODO(jcivelli): see TODO above in didFocus(). | |
| 1987 if (WebUserGestureIndicator::isProcessingUserGesture() && | |
| 1988 !RenderThreadImpl::current()->layout_test_mode()) { | |
| 1989 Send(new ViewHostMsg_Blur(routing_id_)); | |
| 1990 } | |
| 1991 } | |
| 1992 | |
| 1993 // We are supposed to get a single call to Show for a newly created RenderView | 1985 // We are supposed to get a single call to Show for a newly created RenderView |
| 1994 // that was created via RenderViewImpl::CreateWebView. So, we wait until this | 1986 // that was created via RenderViewImpl::CreateWebView. So, we wait until this |
| 1995 // point to dispatch the ShowView message. | 1987 // point to dispatch the ShowView message. |
| 1996 // | 1988 // |
| 1997 // This method provides us with the information about how to display the newly | 1989 // This method provides us with the information about how to display the newly |
| 1998 // created RenderView (i.e., as a blocked popup or as a new tab). | 1990 // created RenderView (i.e., as a blocked popup or as a new tab). |
| 1999 // | 1991 // |
| 2000 void RenderViewImpl::show(WebNavigationPolicy policy) { | 1992 void RenderViewImpl::show(WebNavigationPolicy policy) { |
| 2001 if (did_show_) { | 1993 if (did_show_) { |
| 2002 // When supports_multiple_windows is disabled, popups are reusing | 1994 // When supports_multiple_windows is disabled, popups are reusing |
| (...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3693 std::vector<gfx::Size> sizes; | 3685 std::vector<gfx::Size> sizes; |
| 3694 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3686 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3695 if (!url.isEmpty()) | 3687 if (!url.isEmpty()) |
| 3696 urls.push_back( | 3688 urls.push_back( |
| 3697 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3689 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3698 } | 3690 } |
| 3699 SendUpdateFaviconURL(urls); | 3691 SendUpdateFaviconURL(urls); |
| 3700 } | 3692 } |
| 3701 | 3693 |
| 3702 } // namespace content | 3694 } // namespace content |
| OLD | NEW |