OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/win/shell.h" | 10 #include "app/win/shell.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/browser/renderer_host/render_view_host.h" | 23 #include "chrome/browser/renderer_host/render_view_host.h" |
24 #include "chrome/browser/tab_contents/tab_contents.h" | 24 #include "chrome/browser/tab_contents/tab_contents.h" |
25 #include "chrome/browser/tab_contents/tab_contents_delegate.h" | 25 #include "chrome/browser/tab_contents/tab_contents_delegate.h" |
26 #include "chrome/browser/tab_contents/tab_contents_view.h" | 26 #include "chrome/browser/tab_contents/tab_contents_view.h" |
27 #include "chrome/browser/tab_contents/thumbnail_generator.h" | 27 #include "chrome/browser/tab_contents/thumbnail_generator.h" |
28 #include "chrome/browser/tabs/tab_strip_model.h" | 28 #include "chrome/browser/tabs/tab_strip_model.h" |
29 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 29 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
30 #include "chrome/common/chrome_constants.h" | 30 #include "chrome/common/chrome_constants.h" |
31 #include "chrome/common/chrome_switches.h" | 31 #include "chrome/common/chrome_switches.h" |
32 #include "chrome/installer/util/browser_distribution.h" | 32 #include "chrome/installer/util/browser_distribution.h" |
33 #include "gfx/gdi_util.h" | |
34 #include "gfx/icon_util.h" | |
35 #include "skia/ext/image_operations.h" | 33 #include "skia/ext/image_operations.h" |
36 #include "skia/ext/platform_canvas.h" | 34 #include "skia/ext/platform_canvas.h" |
37 #include "third_party/skia/include/core/SkBitmap.h" | 35 #include "third_party/skia/include/core/SkBitmap.h" |
38 #include "ui/base/win/window_impl.h" | 36 #include "ui/base/win/window_impl.h" |
| 37 #include "ui/gfx/gdi_util.h" |
| 38 #include "ui/gfx/icon_util.h" |
39 #include "views/widget/widget_win.h" | 39 #include "views/widget/widget_win.h" |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 // Macros and COM interfaces used in this file. | 43 // Macros and COM interfaces used in this file. |
44 // These interface declarations are copied from Windows SDK 7. | 44 // These interface declarations are copied from Windows SDK 7. |
45 // TODO(hbono): Bug 16903: to be deleted when we use Windows SDK 7. | 45 // TODO(hbono): Bug 16903: to be deleted when we use Windows SDK 7. |
46 | 46 |
47 // Windows SDK 7 defines these macros only when _WIN32_WINNT >= 0x0601. | 47 // Windows SDK 7 defines these macros only when _WIN32_WINNT >= 0x0601. |
48 // Since Chrome currently sets _WIN32_WINNT to 0x0600, copy these defines here | 48 // Since Chrome currently sets _WIN32_WINNT to 0x0600, copy these defines here |
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 // This code is just copied from "thumbnail_generator.cc". | 1234 // This code is just copied from "thumbnail_generator.cc". |
1235 skia::PlatformCanvas canvas; | 1235 skia::PlatformCanvas canvas; |
1236 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()), | 1236 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()), |
1237 &canvas)) | 1237 &canvas)) |
1238 return false; | 1238 return false; |
1239 | 1239 |
1240 const SkBitmap& bitmap = canvas.getTopPlatformDevice().accessBitmap(false); | 1240 const SkBitmap& bitmap = canvas.getTopPlatformDevice().accessBitmap(false); |
1241 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); | 1241 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); |
1242 return true; | 1242 return true; |
1243 } | 1243 } |
OLD | NEW |