OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/test_runner/pixel_dump.h" | 5 #include "components/test_runner/pixel_dump.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
14 #include "base/trace_event/trace_event.h" | 14 #include "base/trace_event/trace_event.h" |
15 #include "components/test_runner/layout_test_runtime_flags.h" | 15 #include "components/test_runner/layout_test_runtime_flags.h" |
16 // FIXME: Including platform_canvas.h here is a layering violation. | 16 // FIXME: Including platform_canvas.h here is a layering violation. |
17 #include "skia/ext/platform_canvas.h" | 17 #include "skia/ext/platform_canvas.h" |
18 #include "third_party/WebKit/public/platform/Platform.h" | 18 #include "third_party/WebKit/public/platform/Platform.h" |
19 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" | 19 #include "third_party/WebKit/public/platform/WebCompositeAndReadbackAsyncCallbac
k.h" |
20 #include "third_party/WebKit/public/platform/WebImage.h" | 20 #include "third_party/WebKit/public/platform/WebImage.h" |
21 #include "third_party/WebKit/public/platform/WebMockClipboard.h" | 21 #include "third_party/WebKit/public/platform/WebMockClipboard.h" |
22 #include "third_party/WebKit/public/platform/WebPoint.h" | 22 #include "third_party/WebKit/public/platform/WebPoint.h" |
23 #include "third_party/WebKit/public/web/WebFrame.h" | 23 #include "third_party/WebKit/public/web/WebFrame.h" |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 blink::WebImage image = static_cast<blink::WebMockClipboard*>( | 195 blink::WebImage image = static_cast<blink::WebMockClipboard*>( |
196 blink::Platform::current()->clipboard()) | 196 blink::Platform::current()->clipboard()) |
197 ->readRawImage(blink::WebClipboard::Buffer()); | 197 ->readRawImage(blink::WebClipboard::Buffer()); |
198 const SkBitmap& bitmap = image.getSkBitmap(); | 198 const SkBitmap& bitmap = image.getSkBitmap(); |
199 SkAutoLockPixels autoLock(bitmap); | 199 SkAutoLockPixels autoLock(bitmap); |
200 callback.Run(bitmap); | 200 callback.Run(bitmap); |
201 } | 201 } |
202 | 202 |
203 } // namespace test_runner | 203 } // namespace test_runner |
OLD | NEW |