| 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/gpu/gpu_benchmarking_extension.h" | 5 #include "content/renderer/gpu/gpu_benchmarking_extension.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { | 341 if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { |
| 342 // Ensure the mouse is centered and visible, in case it will | 342 // Ensure the mouse is centered and visible, in case it will |
| 343 // trigger any hover or mousemove effects. | 343 // trigger any hover or mousemove effects. |
| 344 context.web_view()->setIsActive(true); | 344 context.web_view()->setIsActive(true); |
| 345 blink::WebRect contentRect = | 345 blink::WebRect contentRect = |
| 346 context.web_view()->mainFrame()->visibleContentRect(); | 346 context.web_view()->mainFrame()->visibleContentRect(); |
| 347 blink::WebMouseEvent mouseMove; | 347 blink::WebMouseEvent mouseMove; |
| 348 mouseMove.type = blink::WebInputEvent::MouseMove; | 348 mouseMove.type = blink::WebInputEvent::MouseMove; |
| 349 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; | 349 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; |
| 350 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; | 350 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; |
| 351 context.web_view()->handleInputEvent(mouseMove); | 351 context.web_view()->handleInputEvent( |
| 352 mouseMove, std::vector<const blink::WebInputEvent*>()); |
| 352 context.web_view()->setCursorVisibilityState(true); | 353 context.web_view()->setCursorVisibilityState(true); |
| 353 } | 354 } |
| 354 | 355 |
| 355 scoped_refptr<CallbackAndContext> callback_and_context = | 356 scoped_refptr<CallbackAndContext> callback_and_context = |
| 356 new CallbackAndContext( | 357 new CallbackAndContext( |
| 357 isolate, callback, context.web_frame()->mainWorldScriptContext()); | 358 isolate, callback, context.web_frame()->mainWorldScriptContext()); |
| 358 | 359 |
| 359 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( | 360 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( |
| 360 new SyntheticSmoothScrollGestureParams); | 361 new SyntheticSmoothScrollGestureParams); |
| 361 | 362 |
| (...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 &gpu_driver_bug_workarounds))) { | 1028 &gpu_driver_bug_workarounds))) { |
| 1028 return; | 1029 return; |
| 1029 } | 1030 } |
| 1030 | 1031 |
| 1031 v8::Local<v8::Value> result; | 1032 v8::Local<v8::Value> result; |
| 1032 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) | 1033 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) |
| 1033 args->Return(result); | 1034 args->Return(result); |
| 1034 } | 1035 } |
| 1035 | 1036 |
| 1036 } // namespace content | 1037 } // namespace content |
| OLD | NEW |