Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: chrome/browser/aeropeek_manager.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 24 matching lines...) Expand all
35 #include "skia/ext/platform_canvas.h" 35 #include "skia/ext/platform_canvas.h"
36 #include "third_party/skia/include/core/SkBitmap.h" 36 #include "third_party/skia/include/core/SkBitmap.h"
37 #include "ui/base/win/shell.h" 37 #include "ui/base/win/shell.h"
38 #include "ui/base/win/window_impl.h" 38 #include "ui/base/win/window_impl.h"
39 #include "ui/gfx/gdi_util.h" 39 #include "ui/gfx/gdi_util.h"
40 #include "ui/gfx/icon_util.h" 40 #include "ui/gfx/icon_util.h"
41 #include "views/widget/native_widget_win.h" 41 #include "views/widget/native_widget_win.h"
42 42
43 #pragma comment(lib, "dwmapi.lib") 43 #pragma comment(lib, "dwmapi.lib")
44 44
45 using content::BrowserThread;
46
45 namespace { 47 namespace {
46 48
47 // Sends a thumbnail bitmap to Windows. Windows assumes this function is called 49 // Sends a thumbnail bitmap to Windows. Windows assumes this function is called
48 // when a WM_DWMSENDICONICTHUMBNAIL message sent to a place-holder window. We 50 // when a WM_DWMSENDICONICTHUMBNAIL message sent to a place-holder window. We
49 // can use DwmInvalidateIconicBitmap() to force Windows to send the message. 51 // can use DwmInvalidateIconicBitmap() to force Windows to send the message.
50 HRESULT CallDwmSetIconicThumbnail(HWND window, HBITMAP bitmap, DWORD flags) { 52 HRESULT CallDwmSetIconicThumbnail(HWND window, HBITMAP bitmap, DWORD flags) {
51 FilePath dwmapi_path(base::GetNativeLibraryName(L"dwmapi")); 53 FilePath dwmapi_path(base::GetNativeLibraryName(L"dwmapi"));
52 base::ScopedNativeLibrary dwmapi(dwmapi_path); 54 base::ScopedNativeLibrary dwmapi(dwmapi_path);
53 55
54 typedef HRESULT (STDAPICALLTYPE *DwmSetIconicThumbnailProc)( 56 typedef HRESULT (STDAPICALLTYPE *DwmSetIconicThumbnailProc)(
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 // This code is just copied from "thumbnail_generator.cc". 1119 // This code is just copied from "thumbnail_generator.cc".
1118 skia::PlatformCanvas canvas; 1120 skia::PlatformCanvas canvas;
1119 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()), 1121 if (!backing_store->CopyFromBackingStore(gfx::Rect(backing_store->size()),
1120 &canvas)) 1122 &canvas))
1121 return false; 1123 return false;
1122 1124
1123 const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false); 1125 const SkBitmap& bitmap = skia::GetTopDevice(canvas)->accessBitmap(false);
1124 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config); 1126 bitmap.copyTo(preview, SkBitmap::kARGB_8888_Config);
1125 return true; 1127 return true;
1126 } 1128 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698