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 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
8 | 8 |
| 9 #include "base/callback.h" |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" |
11 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
12 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/rect.h" |
13 | 14 |
14 namespace ui { | 15 namespace ui { |
15 | 16 |
16 bool GrabViewSnapshot(gfx::NativeView view, | 17 bool GrabViewSnapshot(gfx::NativeView view, |
17 std::vector<unsigned char>* png_representation, | 18 std::vector<unsigned char>* png_representation, |
18 const gfx::Rect& snapshot_bounds) { | 19 const gfx::Rect& snapshot_bounds) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 66 |
66 bool GrabWindowSnapshot(gfx::NativeWindow window, | 67 bool GrabWindowSnapshot(gfx::NativeWindow window, |
67 std::vector<unsigned char>* png_representation, | 68 std::vector<unsigned char>* png_representation, |
68 const gfx::Rect& snapshot_bounds) { | 69 const gfx::Rect& snapshot_bounds) { |
69 // Make sure to grab the "window frame" view so we get current tab + | 70 // Make sure to grab the "window frame" view so we get current tab + |
70 // tabstrip. | 71 // tabstrip. |
71 return GrabViewSnapshot([[window contentView] superview], png_representation, | 72 return GrabViewSnapshot([[window contentView] superview], png_representation, |
72 snapshot_bounds); | 73 snapshot_bounds); |
73 } | 74 } |
74 | 75 |
| 76 SNAPSHOT_EXPORT void GrapWindowSnapshotAsync( |
| 77 gfx::NativeWindow window, |
| 78 const gfx::Rect& snapshot_bounds, |
| 79 const gfx::Size& target_size, |
| 80 scoped_refptr<base::TaskRunner> background_task_runner, |
| 81 GrapWindowSnapshotAsyncCallback callback) { |
| 82 NOTIMPLEMENTED(); |
| 83 } |
| 84 |
75 } // namespace ui | 85 } // namespace ui |
OLD | NEW |