| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
| 6 #define CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/win/windows_version.h" |
| 11 #include "ui/base/win/hwnd_subclass.h" |
| 12 |
| 13 class SkBitmap; |
| 14 |
| 15 class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { |
| 16 public: |
| 17 explicit TaskbarWindowThumbnailerWin(HWND hwnd); |
| 18 virtual ~TaskbarWindowThumbnailerWin(); |
| 19 |
| 20 private: |
| 21 // Overridden from ui::HWNDMessageFilter: |
| 22 virtual bool FilterMessage(HWND hwnd, |
| 23 UINT message, |
| 24 WPARAM w_param, |
| 25 LPARAM l_param, |
| 26 LRESULT* l_result) OVERRIDE; |
| 27 |
| 28 // Message handlers. |
| 29 bool OnDwmSendIconicThumbnail( |
| 30 int width, int height, LRESULT* l_result); |
| 31 bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result); |
| 32 |
| 33 // Captures and returns the screenshot of the window. The caller is |
| 34 // responsible to release the returned SkBitmap instance. |
| 35 SkBitmap* CaptureWindowImage() const; |
| 36 |
| 37 HWND hwnd_; |
| 38 scoped_ptr<SkBitmap> capture_bitmap_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin); |
| 41 }; |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
| OLD | NEW |