| 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 1910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1921 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); | 1921 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); |
| 1922 } | 1922 } |
| 1923 | 1923 |
| 1924 void RenderViewImpl::focusPrevious() { | 1924 void RenderViewImpl::focusPrevious() { |
| 1925 Send(new ViewHostMsg_TakeFocus(routing_id_, true)); | 1925 Send(new ViewHostMsg_TakeFocus(routing_id_, true)); |
| 1926 } | 1926 } |
| 1927 | 1927 |
| 1928 void RenderViewImpl::focusedNodeChanged(const WebNode& node) { | 1928 void RenderViewImpl::focusedNodeChanged(const WebNode& node) { |
| 1929 has_scrolled_focused_editable_node_into_rect_ = false; | 1929 has_scrolled_focused_editable_node_into_rect_ = false; |
| 1930 | 1930 |
| 1931 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); | 1931 gfx::Rect node_bounds; |
| 1932 if (!node.isNull() && node.isElementNode()) { |
| 1933 WebNode web_node = const_cast<WebNode&>(node); |
| 1934 node_bounds = gfx::Rect(web_node.to<WebElement>().boundsInViewportSpace()); |
| 1935 } |
| 1936 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node), |
| 1937 node_bounds)); |
| 1932 | 1938 |
| 1933 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); | 1939 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); |
| 1934 | 1940 |
| 1935 // TODO(dmazzoni): this should be part of RenderFrameObserver. | 1941 // TODO(dmazzoni): this should be part of RenderFrameObserver. |
| 1936 GetMainRenderFrame()->FocusedNodeChanged(node); | 1942 GetMainRenderFrame()->FocusedNodeChanged(node); |
| 1937 } | 1943 } |
| 1938 | 1944 |
| 1939 void RenderViewImpl::didUpdateLayout() { | 1945 void RenderViewImpl::didUpdateLayout() { |
| 1940 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); | 1946 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); |
| 1941 | 1947 |
| (...skipping 2186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4128 std::vector<gfx::Size> sizes; | 4134 std::vector<gfx::Size> sizes; |
| 4129 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4135 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 4130 if (!url.isEmpty()) | 4136 if (!url.isEmpty()) |
| 4131 urls.push_back( | 4137 urls.push_back( |
| 4132 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4138 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 4133 } | 4139 } |
| 4134 SendUpdateFaviconURL(urls); | 4140 SendUpdateFaviconURL(urls); |
| 4135 } | 4141 } |
| 4136 | 4142 |
| 4137 } // namespace content | 4143 } // namespace content |
| OLD | NEW |