Chromium Code Reviews| Index: chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h |
| diff --git a/chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h b/chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h |
| index 909d8b68371f07b1f2336942441da1b09ae42242..a779cd8a467ee39529873208b6eb656330fc034e 100644 |
| --- a/chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h |
| +++ b/chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h |
| @@ -11,17 +11,25 @@ |
| class SkBitmap; |
| +class TaskbarWindowThumbnailerDelegateWin { |
| + public: |
| + // Returns the handle list of all windows that are used to construct the |
| + // thumbnail. If empty list is returned, the snapshot of current window |
| + // is used. |
| + virtual std::vector<HWND> GetSnapshotWindowHandles() const = 0; |
| +}; |
| + |
| // Provides the custom thumbnail and live preview for the window that appears |
| // in the taskbar (Windows 7 and later). |
| class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { |
| public: |
| - explicit TaskbarWindowThumbnailerWin(HWND hwnd); |
| + TaskbarWindowThumbnailerWin(HWND hwnd, |
| + TaskbarWindowThumbnailerDelegateWin* delegate); |
| virtual ~TaskbarWindowThumbnailerWin(); |
| - // Use the snapshots from all the windows in |snapshot_hwnds| to construct |
| - // the thumbnail. If |snapshot_hwnds| is empty, use the snapshot of current |
| - // window. |
| - void Start(const std::vector<HWND>& snapshot_hwnds); |
| + // If |capture_now| is true, the snapshot image is captured immediately. |
|
Dmitry Titov
2013/05/29 01:14:48
capture_now -> should_capture_now
Can we rename it
jianli
2013/05/29 18:31:52
Renamed to capture_snapshot_immediately.
|
| + // Otherwise, it will be captured only when the system requests it. |
| + void Start(bool should_capture_now); |
| void Stop(); |
| private: |
| @@ -33,8 +41,7 @@ class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { |
| LRESULT* l_result) OVERRIDE; |
| // Message handlers. |
| - bool OnDwmSendIconicThumbnail( |
| - int width, int height, LRESULT* l_result); |
| + bool OnDwmSendIconicThumbnail(int width, int height, LRESULT* l_result); |
| bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result); |
| // Captures and returns the screenshot of the window. The caller is |
| @@ -42,7 +49,7 @@ class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { |
| SkBitmap* CaptureWindowImage() const; |
| HWND hwnd_; |
| - std::vector<HWND> snapshot_hwnds_; |
| + TaskbarWindowThumbnailerDelegateWin* delegate_; |
|
Dmitry Titov
2013/05/29 01:14:48
Please add a comment on Weak or not, who owns, why
jianli
2013/05/29 18:31:52
Done.
|
| scoped_ptr<SkBitmap> capture_bitmap_; |
| DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin); |