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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 626983002: Eliminate redundant IPC used for showing the Windows virtual keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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/renderer/render_view_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/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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 Send(new ViewHostMsg_TakeFocus(routing_id_, false)); 1962 Send(new ViewHostMsg_TakeFocus(routing_id_, false));
1963 } 1963 }
1964 1964
1965 void RenderViewImpl::focusPrevious() { 1965 void RenderViewImpl::focusPrevious() {
1966 Send(new ViewHostMsg_TakeFocus(routing_id_, true)); 1966 Send(new ViewHostMsg_TakeFocus(routing_id_, true));
1967 } 1967 }
1968 1968
1969 void RenderViewImpl::focusedNodeChanged(const WebNode& node) { 1969 void RenderViewImpl::focusedNodeChanged(const WebNode& node) {
1970 has_scrolled_focused_editable_node_into_rect_ = false; 1970 has_scrolled_focused_editable_node_into_rect_ = false;
1971 1971
1972 Send(new ViewHostMsg_FocusedNodeChanged(routing_id_, IsEditableNode(node))); 1972 Send(new ViewHostMsg_FocusedNodeChanged(
1973 routing_id_, IsEditableNode(node), handling_event_type_));
1973 1974
1974 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node)); 1975 FOR_EACH_OBSERVER(RenderViewObserver, observers_, FocusedNodeChanged(node));
1975 1976
1976 // TODO(dmazzoni): this should be part of RenderFrameObserver. 1977 // TODO(dmazzoni): this should be part of RenderFrameObserver.
1977 GetMainRenderFrame()->FocusedNodeChanged(node); 1978 GetMainRenderFrame()->FocusedNodeChanged(node);
1978 } 1979 }
1979 1980
1980 void RenderViewImpl::didUpdateLayout() { 1981 void RenderViewImpl::didUpdateLayout() {
1981 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout()); 1982 FOR_EACH_OBSERVER(RenderViewObserver, observers_, DidUpdateLayout());
1982 1983
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 2100
2100 void RenderViewImpl::didHandleGestureEvent( 2101 void RenderViewImpl::didHandleGestureEvent(
2101 const WebGestureEvent& event, 2102 const WebGestureEvent& event,
2102 bool event_cancelled) { 2103 bool event_cancelled) {
2103 RenderWidget::didHandleGestureEvent(event, event_cancelled); 2104 RenderWidget::didHandleGestureEvent(event, event_cancelled);
2104 2105
2105 if (!event_cancelled) { 2106 if (!event_cancelled) {
2106 FOR_EACH_OBSERVER( 2107 FOR_EACH_OBSERVER(
2107 RenderViewObserver, observers_, DidHandleGestureEvent(event)); 2108 RenderViewObserver, observers_, DidHandleGestureEvent(event));
2108 } 2109 }
2109
2110 if (event.type != blink::WebGestureEvent::GestureTap)
2111 return;
2112
2113 // TODO(estade): hit test the event against focused node to make sure
2114 // the tap actually hit the focused node.
2115 blink::WebTextInputType text_input_type =
2116 GetWebView()->textInputInfo().type;
2117
2118 Send(new ViewHostMsg_FocusedNodeTouched(
2119 routing_id(), text_input_type != blink::WebTextInputTypeNone));
2120 } 2110 }
2121 2111
2122 void RenderViewImpl::initializeLayerTreeView() { 2112 void RenderViewImpl::initializeLayerTreeView() {
2123 RenderWidget::initializeLayerTreeView(); 2113 RenderWidget::initializeLayerTreeView();
2124 RenderWidgetCompositor* rwc = compositor(); 2114 RenderWidgetCompositor* rwc = compositor();
2125 if (!rwc) 2115 if (!rwc)
2126 return; 2116 return;
2127 if (webview() && webview()->devToolsAgent()) 2117 if (webview() && webview()->devToolsAgent())
2128 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); 2118 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId());
2129 2119
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after
4183 std::vector<gfx::Size> sizes; 4173 std::vector<gfx::Size> sizes;
4184 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4174 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4185 if (!url.isEmpty()) 4175 if (!url.isEmpty())
4186 urls.push_back( 4176 urls.push_back(
4187 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4177 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4188 } 4178 }
4189 SendUpdateFaviconURL(urls); 4179 SendUpdateFaviconURL(urls);
4190 } 4180 }
4191 4181
4192 } // namespace content 4182 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698