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 2089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2100 void RenderViewImpl::didHandleGestureEvent( | 2100 void RenderViewImpl::didHandleGestureEvent( |
2101 const WebGestureEvent& event, | 2101 const WebGestureEvent& event, |
2102 bool event_cancelled) { | 2102 bool event_cancelled) { |
2103 RenderWidget::didHandleGestureEvent(event, event_cancelled); | 2103 RenderWidget::didHandleGestureEvent(event, event_cancelled); |
2104 | 2104 |
2105 if (!event_cancelled) { | 2105 if (!event_cancelled) { |
2106 FOR_EACH_OBSERVER( | 2106 FOR_EACH_OBSERVER( |
2107 RenderViewObserver, observers_, DidHandleGestureEvent(event)); | 2107 RenderViewObserver, observers_, DidHandleGestureEvent(event)); |
2108 } | 2108 } |
2109 | 2109 |
| 2110 // TODO(ananta): Piggyback off existing IPCs to communicate this information, |
| 2111 // crbug/420130. |
| 2112 #if defined(OS_WIN) |
2110 if (event.type != blink::WebGestureEvent::GestureTap) | 2113 if (event.type != blink::WebGestureEvent::GestureTap) |
2111 return; | 2114 return; |
2112 | 2115 |
2113 // TODO(estade): hit test the event against focused node to make sure | 2116 // TODO(estade): hit test the event against focused node to make sure |
2114 // the tap actually hit the focused node. | 2117 // the tap actually hit the focused node. |
2115 blink::WebTextInputType text_input_type = | 2118 blink::WebTextInputType text_input_type = |
2116 GetWebView()->textInputInfo().type; | 2119 GetWebView()->textInputInfo().type; |
2117 | 2120 |
2118 Send(new ViewHostMsg_FocusedNodeTouched( | 2121 Send(new ViewHostMsg_FocusedNodeTouched( |
2119 routing_id(), text_input_type != blink::WebTextInputTypeNone)); | 2122 routing_id(), text_input_type != blink::WebTextInputTypeNone)); |
| 2123 #endif |
2120 } | 2124 } |
2121 | 2125 |
2122 void RenderViewImpl::initializeLayerTreeView() { | 2126 void RenderViewImpl::initializeLayerTreeView() { |
2123 RenderWidget::initializeLayerTreeView(); | 2127 RenderWidget::initializeLayerTreeView(); |
2124 RenderWidgetCompositor* rwc = compositor(); | 2128 RenderWidgetCompositor* rwc = compositor(); |
2125 if (!rwc) | 2129 if (!rwc) |
2126 return; | 2130 return; |
2127 if (webview() && webview()->devToolsAgent()) | 2131 if (webview() && webview()->devToolsAgent()) |
2128 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); | 2132 webview()->devToolsAgent()->setLayerTreeId(rwc->GetLayerTreeId()); |
2129 | 2133 |
(...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4183 std::vector<gfx::Size> sizes; | 4187 std::vector<gfx::Size> sizes; |
4184 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 4188 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
4185 if (!url.isEmpty()) | 4189 if (!url.isEmpty()) |
4186 urls.push_back( | 4190 urls.push_back( |
4187 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 4191 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
4188 } | 4192 } |
4189 SendUpdateFaviconURL(urls); | 4193 SendUpdateFaviconURL(urls); |
4190 } | 4194 } |
4191 | 4195 |
4192 } // namespace content | 4196 } // namespace content |
OLD | NEW |