| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/aeropeek_manager.h" | 5 #include "chrome/browser/aeropeek_manager.h" |
| 6 | 6 |
| 7 #include <dwmapi.h> | 7 #include <dwmapi.h> |
| 8 #include <shobjidl.h> | 8 #include <shobjidl.h> |
| 9 | 9 |
| 10 #include "app/gfx/gdi_util.h" | 10 #include "app/gfx/gdi_util.h" |
| 11 #include "app/gfx/icon_util.h" | |
| 12 #include "app/gfx/insets.h" | 11 #include "app/gfx/insets.h" |
| 13 #include "app/win_util.h" | 12 #include "app/win_util.h" |
| 14 #include "app/win/window_impl.h" | 13 #include "app/win/window_impl.h" |
| 15 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 16 #include "base/scoped_comptr_win.h" | 15 #include "base/scoped_comptr_win.h" |
| 17 #include "base/scoped_handle_win.h" | 16 #include "base/scoped_handle_win.h" |
| 18 #include "base/scoped_native_library.h" | 17 #include "base/scoped_native_library.h" |
| 19 #include "base/win_util.h" | 18 #include "base/win_util.h" |
| 20 #include "chrome/app/chrome_dll_resource.h" | 19 #include "chrome/app/chrome_dll_resource.h" |
| 21 #include "chrome/browser/browser_list.h" | 20 #include "chrome/browser/browser_list.h" |
| 22 #include "chrome/browser/browser_process.h" | 21 #include "chrome/browser/browser_process.h" |
| 23 #include "chrome/browser/chrome_thread.h" | 22 #include "chrome/browser/chrome_thread.h" |
| 24 #include "chrome/browser/renderer_host/backing_store.h" | 23 #include "chrome/browser/renderer_host/backing_store.h" |
| 25 #include "chrome/browser/renderer_host/render_view_host.h" | 24 #include "chrome/browser/renderer_host/render_view_host.h" |
| 26 #include "chrome/browser/tab_contents/tab_contents.h" | 25 #include "chrome/browser/tab_contents/tab_contents.h" |
| 27 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 26 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
| 28 #include "chrome/browser/tab_contents/tab_contents_view.h" | 27 #include "chrome/browser/tab_contents/tab_contents_view.h" |
| 29 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 28 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
| 30 #include "chrome/common/chrome_constants.h" | 29 #include "chrome/common/chrome_constants.h" |
| 31 #include "chrome/common/chrome_switches.h" | 30 #include "chrome/common/chrome_switches.h" |
| 31 #include "gfx/icon_util.h" |
| 32 #include "skia/ext/image_operations.h" | 32 #include "skia/ext/image_operations.h" |
| 33 #include "skia/ext/platform_canvas.h" | 33 #include "skia/ext/platform_canvas.h" |
| 34 #include "third_party/skia/include/core/SkBitmap.h" | 34 #include "third_party/skia/include/core/SkBitmap.h" |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 // Macros and COM interfaces used in this file. | 38 // Macros and COM interfaces used in this file. |
| 39 // These interface declarations are copied from Windows SDK 7. | 39 // These interface declarations are copied from Windows SDK 7. |
| 40 // TODO(hbono): Bug 16903: to be deleted when we use Windows SDK 7. | 40 // TODO(hbono): Bug 16903: to be deleted when we use Windows SDK 7. |
| 41 | 41 |
| (...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1214 skia::PlatformCanvas canvas; | 1214 skia::PlatformCanvas canvas; |
| 1215 if (!backing_store->CopyFromBackingStore(gfx::Rect(gfx::Point(0, 0), | 1215 if (!backing_store->CopyFromBackingStore(gfx::Rect(gfx::Point(0, 0), |
| 1216 backing_store->size()), | 1216 backing_store->size()), |
| 1217 &canvas)) | 1217 &canvas)) |
| 1218 return false; | 1218 return false; |
| 1219 | 1219 |
| 1220 const SkBitmap& bitmap = canvas.getTopPlatformDevice().accessBitmap(false); | 1220 const SkBitmap& bitmap = canvas.getTopPlatformDevice().accessBitmap(false); |
| 1221 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); | 1221 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); |
| 1222 return true; | 1222 return true; |
| 1223 } | 1223 } |
| OLD | NEW |