OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <vector> | 9 #include <vector> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ui/base/win/hwnd_subclass.h" | 12 #include "ui/base/win/hwnd_subclass.h" |
13 | 13 |
14 class SkBitmap; | 14 class SkBitmap; |
15 | 15 |
16 class TaskbarWindowThumbnailerDelegateWin { | 16 class TaskbarWindowThumbnailerDelegateWin { |
17 public: | 17 public: |
18 // Returns the list of handles for all windows that are used to construct the | 18 // Returns the list of handles for all windows that are used to construct the |
19 // thumbnail. If empty list is returned, the snapshot of current window | 19 // thumbnail. If empty list is returned, the snapshot of current window |
20 // is used. | 20 // is used. |
21 virtual std::vector<HWND> GetSnapshotWindowHandles() const = 0; | 21 virtual std::vector<HWND> GetSnapshotWindowHandles() const = 0; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // Message handlers. | 59 // Message handlers. |
60 bool OnDwmSendIconicThumbnail(int width, int height, LRESULT* l_result); | 60 bool OnDwmSendIconicThumbnail(int width, int height, LRESULT* l_result); |
61 bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result); | 61 bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result); |
62 | 62 |
63 // Captures and returns the screenshot of the window. The caller is | 63 // Captures and returns the screenshot of the window. The caller is |
64 // responsible to release the returned SkBitmap instance. | 64 // responsible to release the returned SkBitmap instance. |
65 SkBitmap* CaptureWindowImage() const; | 65 SkBitmap* CaptureWindowImage() const; |
66 | 66 |
67 HWND hwnd_; | 67 HWND hwnd_; |
68 TaskbarWindowThumbnailerDelegateWin* delegate_; // Weak, owns us. | 68 TaskbarWindowThumbnailerDelegateWin* delegate_; // Weak, owns us. |
69 scoped_ptr<SkBitmap> capture_bitmap_; | 69 std::unique_ptr<SkBitmap> capture_bitmap_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin); | 71 DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin); |
72 }; | 72 }; |
73 | 73 |
74 #endif // CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ | 74 #endif // CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_ |
OLD | NEW |