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 2308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2319 | 2319 |
2320 void RenderViewImpl::requestPointerUnlock() { | 2320 void RenderViewImpl::requestPointerUnlock() { |
2321 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); | 2321 mouse_lock_dispatcher_->UnlockMouse(webwidget_mouse_lock_target_.get()); |
2322 } | 2322 } |
2323 | 2323 |
2324 bool RenderViewImpl::isPointerLocked() { | 2324 bool RenderViewImpl::isPointerLocked() { |
2325 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2325 return mouse_lock_dispatcher_->IsMouseLockedTo( |
2326 webwidget_mouse_lock_target_.get()); | 2326 webwidget_mouse_lock_target_.get()); |
2327 } | 2327 } |
2328 | 2328 |
| 2329 // FIXME: To be removed as soon as chromium and blink side changes land |
| 2330 // didActivateCompositor with parameters is still kept in order to land |
| 2331 // these changes s-chromium - https://codereview.chromium.org/137893025/. |
| 2332 // s-blink - https://codereview.chromium.org/138523003/ |
2329 void RenderViewImpl::didActivateCompositor(int input_handler_identifier) { | 2333 void RenderViewImpl::didActivateCompositor(int input_handler_identifier) { |
2330 #if !defined(OS_MACOSX) // many events are unhandled - http://crbug.com/138003 | 2334 #if !defined(OS_MACOSX) // many events are unhandled - http://crbug.com/138003 |
2331 InputHandlerManager* input_handler_manager = | 2335 InputHandlerManager* input_handler_manager = |
2332 RenderThreadImpl::current()->input_handler_manager(); | 2336 RenderThreadImpl::current()->input_handler_manager(); |
2333 if (input_handler_manager) { | 2337 if (input_handler_manager) { |
2334 input_handler_manager->AddInputHandler( | 2338 input_handler_manager->AddInputHandler( |
2335 routing_id_, | 2339 routing_id_, |
2336 compositor_->GetInputHandler(), | 2340 compositor_->GetInputHandler(), |
2337 AsWeakPtr()); | 2341 AsWeakPtr()); |
2338 } | 2342 } |
2339 #endif | 2343 #endif |
2340 | 2344 |
2341 RenderWidget::didActivateCompositor(input_handler_identifier); | 2345 RenderWidget::didActivateCompositor(input_handler_identifier); |
2342 } | 2346 } |
2343 | 2347 |
| 2348 void RenderViewImpl::didActivateCompositor() { |
| 2349 #if !defined(OS_MACOSX) // many events are unhandled - http://crbug.com/138003 |
| 2350 InputHandlerManager* input_handler_manager = |
| 2351 RenderThreadImpl::current()->input_handler_manager(); |
| 2352 if (input_handler_manager) { |
| 2353 input_handler_manager->AddInputHandler( |
| 2354 routing_id_, |
| 2355 compositor_->GetInputHandler(), |
| 2356 AsWeakPtr()); |
| 2357 } |
| 2358 #endif |
| 2359 |
| 2360 RenderWidget::didActivateCompositor(); |
| 2361 } |
| 2362 |
2344 void RenderViewImpl::didHandleGestureEvent( | 2363 void RenderViewImpl::didHandleGestureEvent( |
2345 const WebGestureEvent& event, | 2364 const WebGestureEvent& event, |
2346 bool event_cancelled) { | 2365 bool event_cancelled) { |
2347 RenderWidget::didHandleGestureEvent(event, event_cancelled); | 2366 RenderWidget::didHandleGestureEvent(event, event_cancelled); |
2348 | 2367 |
2349 if (event.type != blink::WebGestureEvent::GestureTap) | 2368 if (event.type != blink::WebGestureEvent::GestureTap) |
2350 return; | 2369 return; |
2351 | 2370 |
2352 blink::WebTextInputType text_input_type = | 2371 blink::WebTextInputType text_input_type = |
2353 GetWebView()->textInputInfo().type; | 2372 GetWebView()->textInputInfo().type; |
(...skipping 2801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5155 for (size_t i = 0; i < icon_urls.size(); i++) { | 5174 for (size_t i = 0; i < icon_urls.size(); i++) { |
5156 WebURL url = icon_urls[i].iconURL(); | 5175 WebURL url = icon_urls[i].iconURL(); |
5157 if (!url.isEmpty()) | 5176 if (!url.isEmpty()) |
5158 urls.push_back(FaviconURL(url, | 5177 urls.push_back(FaviconURL(url, |
5159 ToFaviconType(icon_urls[i].iconType()))); | 5178 ToFaviconType(icon_urls[i].iconType()))); |
5160 } | 5179 } |
5161 SendUpdateFaviconURL(urls); | 5180 SendUpdateFaviconURL(urls); |
5162 } | 5181 } |
5163 | 5182 |
5164 } // namespace content | 5183 } // namespace content |
OLD | NEW |