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 "ui/snapshot/snapshot.h" | 5 #include "ui/snapshot/snapshot.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
9 #include "third_party/skia/include/core/SkBitmap.h" | 9 #include "third_party/skia/include/core/SkBitmap.h" |
10 #include "ui/base/android/view_android.h" | 10 #include "ui/android/view_android.h" |
11 #include "ui/base/android/window_android.h" | 11 #include "ui/android/window_android.h" |
12 #include "ui/base/android/window_android_compositor.h" | 12 #include "ui/android/window_android_compositor.h" |
13 #include "ui/gfx/display.h" | 13 #include "ui/gfx/display.h" |
14 #include "ui/gfx/geometry/point_conversions.h" | 14 #include "ui/gfx/geometry/point_conversions.h" |
15 #include "ui/gfx/geometry/rect_conversions.h" | 15 #include "ui/gfx/geometry/rect_conversions.h" |
16 #include "ui/gfx/screen.h" | 16 #include "ui/gfx/screen.h" |
17 #include "ui/snapshot/snapshot_async.h" | 17 #include "ui/snapshot/snapshot_async.h" |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 | 20 |
21 bool GrabViewSnapshot(gfx::NativeView view, | 21 bool GrabViewSnapshot(gfx::NativeView view, |
22 std::vector<unsigned char>* png_representation, | 22 std::vector<unsigned char>* png_representation, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 void GrabViewSnapshotAsync( | 85 void GrabViewSnapshotAsync( |
86 gfx::NativeView view, | 86 gfx::NativeView view, |
87 const gfx::Rect& source_rect, | 87 const gfx::Rect& source_rect, |
88 scoped_refptr<base::TaskRunner> background_task_runner, | 88 scoped_refptr<base::TaskRunner> background_task_runner, |
89 const GrabWindowSnapshotAsyncPNGCallback& callback) { | 89 const GrabWindowSnapshotAsyncPNGCallback& callback) { |
90 GrabWindowSnapshotAsync( | 90 GrabWindowSnapshotAsync( |
91 view->GetWindowAndroid(), source_rect, background_task_runner, callback); | 91 view->GetWindowAndroid(), source_rect, background_task_runner, callback); |
92 } | 92 } |
93 | 93 |
94 } // namespace ui | 94 } // namespace ui |
OLD | NEW |