| 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 17 matching lines...) Expand all Loading... |
| 28 #include "content/public/renderer/chrome_object_extensions_utils.h" | 28 #include "content/public/renderer/chrome_object_extensions_utils.h" |
| 29 #include "content/public/renderer/render_thread.h" | 29 #include "content/public/renderer/render_thread.h" |
| 30 #include "content/renderer/gpu/render_widget_compositor.h" | 30 #include "content/renderer/gpu/render_widget_compositor.h" |
| 31 #include "content/renderer/render_thread_impl.h" | 31 #include "content/renderer/render_thread_impl.h" |
| 32 #include "content/renderer/render_view_impl.h" | 32 #include "content/renderer/render_view_impl.h" |
| 33 #include "content/renderer/skia_benchmarking_extension.h" | 33 #include "content/renderer/skia_benchmarking_extension.h" |
| 34 #include "gin/arguments.h" | 34 #include "gin/arguments.h" |
| 35 #include "gin/handle.h" | 35 #include "gin/handle.h" |
| 36 #include "gin/object_template_builder.h" | 36 #include "gin/object_template_builder.h" |
| 37 #include "gpu/ipc/common/gpu_messages.h" | 37 #include "gpu/ipc/common/gpu_messages.h" |
| 38 #include "third_party/WebKit/public/platform/CoalescedWebInputEvent.h" |
| 38 #include "third_party/WebKit/public/web/WebImageCache.h" | 39 #include "third_party/WebKit/public/web/WebImageCache.h" |
| 39 #include "third_party/WebKit/public/web/WebKit.h" | 40 #include "third_party/WebKit/public/web/WebKit.h" |
| 40 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 41 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| 41 #include "third_party/WebKit/public/web/WebPrintParams.h" | 42 #include "third_party/WebKit/public/web/WebPrintParams.h" |
| 42 #include "third_party/WebKit/public/web/WebSettings.h" | 43 #include "third_party/WebKit/public/web/WebSettings.h" |
| 43 #include "third_party/WebKit/public/web/WebView.h" | 44 #include "third_party/WebKit/public/web/WebView.h" |
| 44 #include "third_party/skia/include/core/SkData.h" | 45 #include "third_party/skia/include/core/SkData.h" |
| 45 #include "third_party/skia/include/core/SkGraphics.h" | 46 #include "third_party/skia/include/core/SkGraphics.h" |
| 46 #include "third_party/skia/include/core/SkPicture.h" | 47 #include "third_party/skia/include/core/SkPicture.h" |
| 47 #include "third_party/skia/include/core/SkPictureRecorder.h" | 48 #include "third_party/skia/include/core/SkPictureRecorder.h" |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { | 342 if (gesture_source_type == SyntheticGestureParams::MOUSE_INPUT) { |
| 342 // Ensure the mouse is centered and visible, in case it will | 343 // Ensure the mouse is centered and visible, in case it will |
| 343 // trigger any hover or mousemove effects. | 344 // trigger any hover or mousemove effects. |
| 344 context.web_view()->setIsActive(true); | 345 context.web_view()->setIsActive(true); |
| 345 blink::WebRect contentRect = | 346 blink::WebRect contentRect = |
| 346 context.web_view()->mainFrame()->visibleContentRect(); | 347 context.web_view()->mainFrame()->visibleContentRect(); |
| 347 blink::WebMouseEvent mouseMove; | 348 blink::WebMouseEvent mouseMove; |
| 348 mouseMove.type = blink::WebInputEvent::MouseMove; | 349 mouseMove.type = blink::WebInputEvent::MouseMove; |
| 349 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; | 350 mouseMove.x = (contentRect.x + contentRect.width / 2) * page_scale_factor; |
| 350 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; | 351 mouseMove.y = (contentRect.y + contentRect.height / 2) * page_scale_factor; |
| 351 context.web_view()->handleInputEvent(mouseMove); | 352 context.web_view()->handleInputEvent( |
| 353 blink::CoalescedWebInputEvent(mouseMove)); |
| 352 context.web_view()->setCursorVisibilityState(true); | 354 context.web_view()->setCursorVisibilityState(true); |
| 353 } | 355 } |
| 354 | 356 |
| 355 scoped_refptr<CallbackAndContext> callback_and_context = | 357 scoped_refptr<CallbackAndContext> callback_and_context = |
| 356 new CallbackAndContext( | 358 new CallbackAndContext( |
| 357 isolate, callback, context.web_frame()->mainWorldScriptContext()); | 359 isolate, callback, context.web_frame()->mainWorldScriptContext()); |
| 358 | 360 |
| 359 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( | 361 std::unique_ptr<SyntheticSmoothScrollGestureParams> gesture_params( |
| 360 new SyntheticSmoothScrollGestureParams); | 362 new SyntheticSmoothScrollGestureParams); |
| 361 | 363 |
| (...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 &gpu_driver_bug_workarounds))) { | 1044 &gpu_driver_bug_workarounds))) { |
| 1043 return; | 1045 return; |
| 1044 } | 1046 } |
| 1045 | 1047 |
| 1046 v8::Local<v8::Value> result; | 1048 v8::Local<v8::Value> result; |
| 1047 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) | 1049 if (gin::TryConvertToV8(args->isolate(), gpu_driver_bug_workarounds, &result)) |
| 1048 args->Return(result); | 1050 args->Return(result); |
| 1049 } | 1051 } |
| 1050 | 1052 |
| 1051 } // namespace content | 1053 } // namespace content |
| OLD | NEW |