| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // Ensure the mouse is centered and visible, in case it will | 347 // Ensure the mouse is centered and visible, in case it will |
| 348 // trigger any hover or mousemove effects. | 348 // trigger any hover or mousemove effects. |
| 349 context.web_view()->setIsActive(true); | 349 context.web_view()->setIsActive(true); |
| 350 blink::WebRect contentRect = | 350 blink::WebRect contentRect = |
| 351 context.web_view()->mainFrame()->visibleContentRect(); | 351 context.web_view()->mainFrame()->visibleContentRect(); |
| 352 blink::WebMouseEvent mouseMove( | 352 blink::WebMouseEvent mouseMove( |
| 353 blink::WebInputEvent::MouseMove, blink::WebInputEvent::NoModifiers, | 353 blink::WebInputEvent::MouseMove, blink::WebInputEvent::NoModifiers, |
| 354 ui::EventTimeStampToSeconds(ui::EventTimeForNow())); | 354 ui::EventTimeStampToSeconds(ui::EventTimeForNow())); |
| 355 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; | 355 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; |
| 356 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; | 356 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; |
| 357 context.web_view()->handleInputEvent(mouseMove); | 357 context.web_view()->handleInputEvent( |
| 358 blink::WebCoalescedInputEvent(mouseMove)); |
| 358 context.web_view()->setCursorVisibilityState(true); | 359 context.web_view()->setCursorVisibilityState(true); |
| 359 } | 360 } |
| 360 | 361 |
| 361 scoped_refptr<CallbackAndContext> callback_and_context = | 362 scoped_refptr<CallbackAndContext> callback_and_context = |
| 362 new CallbackAndContext( | 363 new CallbackAndContext( |
| 363 isolate, callback, context.web_frame()->mainWorldScriptContext()); | 364 isolate, callback, context.web_frame()->mainWorldScriptContext()); |
| 364 | 365 |
| 365 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( | 366 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( |
| 366 new SyntheticSmoothScrollGestureParams); | 367 new SyntheticSmoothScrollGestureParams); |
| 367 | 368 |
| (...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1096 &gpu_driver_bug_workarounds))) { | 1097 &gpu_driver_bug_workarounds))) { |
| 1097 return; | 1098 return; |
| 1098 } | 1099 } |
| 1099 | 1100 |
| 1100 v8::Local<v8::Value> result; | 1101 v8::Local<v8::Value> result; |
| 1101 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) | 1102 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) |
| 1102 args->Return(result); | 1103 args->Return(result); |
| 1103 } | 1104 } |
| 1104 | 1105 |
| 1105 } // namespace content | 1106 } // namespace content |
| OLD | NEW |