| 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_win.h" | 5 #include "ui/snapshot/snapshot_win.h" |
| 6 | 6 |
| 7 #include "base/win/scoped_gdi_object.h" | 7 #include "base/win/scoped_gdi_object.h" |
| 8 #include "base/win/scoped_hdc.h" | 8 #include "base/win/scoped_hdc.h" |
| 9 #include "base/win/scoped_select_object.h" | 9 #include "base/win/scoped_select_object.h" |
| 10 #include "ui/gfx/codec/png_codec.h" | 10 #include "ui/gfx/codec/png_codec.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 png_representation); | 96 png_representation); |
| 97 | 97 |
| 98 ReleaseDC(window_handle, window_hdc); | 98 ReleaseDC(window_handle, window_hdc); |
| 99 | 99 |
| 100 return true; | 100 return true; |
| 101 } | 101 } |
| 102 | 102 |
| 103 } // namespace internal | 103 } // namespace internal |
| 104 | 104 |
| 105 #if !defined(USE_AURA) | 105 #if !defined(USE_AURA) |
| 106 |
| 106 bool GrabViewSnapshot(gfx::NativeView view_handle, | 107 bool GrabViewSnapshot(gfx::NativeView view_handle, |
| 107 std::vector<unsigned char>* png_representation, | 108 std::vector<unsigned char>* png_representation, |
| 108 const gfx::Rect& snapshot_bounds) { | 109 const gfx::Rect& snapshot_bounds) { |
| 109 return GrabWindowSnapshot(view_handle, png_representation, snapshot_bounds); | 110 return GrabWindowSnapshot(view_handle, png_representation, snapshot_bounds); |
| 110 } | 111 } |
| 111 | 112 |
| 112 bool GrabWindowSnapshot(gfx::NativeWindow window_handle, | 113 bool GrabWindowSnapshot(gfx::NativeWindow window_handle, |
| 113 std::vector<unsigned char>* png_representation, | 114 std::vector<unsigned char>* png_representation, |
| 114 const gfx::Rect& snapshot_bounds) { | 115 const gfx::Rect& snapshot_bounds) { |
| 115 DCHECK(window_handle); | 116 DCHECK(window_handle); |
| 116 return internal::GrabHwndSnapshot(window_handle, snapshot_bounds, | 117 return internal::GrabHwndSnapshot(window_handle, snapshot_bounds, |
| 117 png_representation); | 118 png_representation); |
| 118 } | 119 } |
| 120 |
| 121 SNAPSHOT_EXPORT void GrapWindowSnapshotAsync( |
| 122 gfx::NativeWindow window, |
| 123 const gfx::Rect& snapshot_bounds, |
| 124 const gfx::Size& target_size, |
| 125 scoped_refptr<base::TaskRunner> background_task_runner, |
| 126 GrapWindowSnapshotAsyncCallback callback) { |
| 127 NOTIMPLEMENTED(); |
| 128 } |
| 129 |
| 119 #endif // !defined(USE_AURA) | 130 #endif // !defined(USE_AURA) |
| 120 | 131 |
| 121 } // namespace ui | 132 } // namespace ui |
| OLD | NEW |