| 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 "ui/base/win/hwnd_subclass.h" |
| 11 |
| 12 class SkBitmap; |
| 13 |
| 14 // Provides the custom thumbnail and live preview for the window that appears |
| 15 // in the taskbar (Windows 7 and later). |
| 16 class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { |
| 17 public: |
| 18 explicit TaskbarWindowThumbnailerWin(HWND hwnd); |
| 19 virtual ~TaskbarWindowThumbnailerWin(); |
| 20 |
| 21 void Start(); |
| 22 void Stop(); |
| 23 |
| 24 private: |
| 25 // Overridden from ui::HWNDMessageFilter: |
| 26 virtual bool FilterMessage(HWND hwnd, |
| 27 UINT message, |
| 28 WPARAM w_param, |
| 29 LPARAM l_param, |
| 30 LRESULT* l_result) OVERRIDE; |
| 31 |
| 32 // Message handlers. |
| 33 bool OnDwmSendIconicThumbnail( |
| 34 int width, int height, LRESULT* l_result); |
| 35 bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result); |
| 36 |
| 37 // Captures and returns the screenshot of the window. The caller is |
| 38 // responsible to release the returned SkBitmap instance. |
| 39 SkBitmap* CaptureWindowImage() const; |
| 40 |
| 41 HWND hwnd_; |
| 42 scoped_ptr<SkBitmap> capture_bitmap_; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin); |
| 45 }; |
| 46 |
| 47 #endif // CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
| OLD | NEW |