| 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/callback.h" | 7 #include "base/callback.h" |
| 8 #include "ui/gfx/geometry/rect.h" | 8 #include "ui/gfx/geometry/rect.h" |
| 9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
| 10 | 10 |
| 11 namespace ui { | 11 namespace ui { |
| 12 | 12 |
| 13 bool GrabViewSnapshot(gfx::NativeView view, | 13 bool GrabViewSnapshot(gfx::NativeView view, |
| 14 std::vector<unsigned char>* png_representation, | 14 gfx::Image* image, |
| 15 const gfx::Rect& snapshot_bounds) { | 15 const gfx::Rect& snapshot_bounds) { |
| 16 // TODO(bajones): Implement iOS snapshot functionality | 16 // TODO(bajones): Implement iOS snapshot functionality |
| 17 return false; | 17 return false; |
| 18 } | 18 } |
| 19 | 19 |
| 20 bool GrabWindowSnapshot(gfx::NativeWindow window, | 20 bool GrabWindowSnapshot(gfx::NativeWindow window, |
| 21 std::vector<unsigned char>* png_representation, | 21 gfx::Image* image, |
| 22 const gfx::Rect& snapshot_bounds) { | 22 const gfx::Rect& snapshot_bounds) { |
| 23 // TODO(bajones): Implement iOS snapshot functionality | 23 // TODO(bajones): Implement iOS snapshot functionality |
| 24 return false; | 24 return false; |
| 25 } | 25 } |
| 26 | 26 |
| 27 void GrabWindowSnapshotAndScaleAsync( | 27 void GrabWindowSnapshotAndScaleAsync( |
| 28 gfx::NativeWindow window, | 28 gfx::NativeWindow window, |
| 29 const gfx::Rect& snapshot_bounds, | 29 const gfx::Rect& snapshot_bounds, |
| 30 const gfx::Size& target_size, | 30 const gfx::Size& target_size, |
| 31 scoped_refptr<base::TaskRunner> background_task_runner, | 31 scoped_refptr<base::TaskRunner> background_task_runner, |
| 32 GrabWindowSnapshotAsyncCallback callback) { | 32 GrabWindowSnapshotAsyncCallback callback) { |
| 33 callback.Run(gfx::Image()); | 33 callback.Run(gfx::Image()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void GrabViewSnapshotAsync( | 36 void GrabViewSnapshotAsync(gfx::NativeView view, |
| 37 gfx::NativeView view, | 37 const gfx::Rect& source_rect, |
| 38 const gfx::Rect& source_rect, | 38 const GrabWindowSnapshotAsyncCallback& callback) { |
| 39 scoped_refptr<base::TaskRunner> background_task_runner, | 39 callback.Run(gfx::Image()); |
| 40 const GrabWindowSnapshotAsyncPNGCallback& callback) { | |
| 41 callback.Run(scoped_refptr<base::RefCountedBytes>()); | |
| 42 } | 40 } |
| 43 | 41 |
| 44 void GrabWindowSnapshotAsync( | 42 void GrabWindowSnapshotAsync(gfx::NativeWindow window, |
| 45 gfx::NativeWindow window, | 43 const gfx::Rect& source_rect, |
| 46 const gfx::Rect& source_rect, | 44 const GrabWindowSnapshotAsyncCallback& callback) { |
| 47 scoped_refptr<base::TaskRunner> background_task_runner, | 45 callback.Run(gfx::Image()); |
| 48 const GrabWindowSnapshotAsyncPNGCallback& callback) { | |
| 49 callback.Run(scoped_refptr<base::RefCountedBytes>()); | |
| 50 } | 46 } |
| 51 | 47 |
| 52 } // namespace ui | 48 } // namespace ui |
| OLD | NEW |