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

Unified Diff: chrome/browser/ui/panels/taskbar_window_thumbnailer_win.h

Issue 10408047: Fix bug 105043: Panels [WIN]: For minimize panels, taskbar hover preview show the 4-pixel represent… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix win_aura Created 8 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/panels/taskbar_window_thumbnailer_win.h
diff --git a/chrome/browser/ui/panels/taskbar_window_thumbnailer_win.h b/chrome/browser/ui/panels/taskbar_window_thumbnailer_win.h
new file mode 100644
index 0000000000000000000000000000000000000000..537d596ef98d933612d2e0c3411efb4ad7031df2
--- /dev/null
+++ b/chrome/browser/ui/panels/taskbar_window_thumbnailer_win.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_
+#define CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_
+#pragma once
+
+#include "base/memory/scoped_ptr.h"
+#include "ui/base/win/hwnd_subclass.h"
+
+class SkBitmap;
+
+// 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);
+ virtual ~TaskbarWindowThumbnailerWin();
+
+ void Start();
+ void Stop();
+
+ private:
+ // Overridden from ui::HWNDMessageFilter:
+ virtual bool FilterMessage(HWND hwnd,
+ UINT message,
+ WPARAM w_param,
+ LPARAM l_param,
+ LRESULT* l_result) OVERRIDE;
+
+ // Message handlers.
+ 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
+ // responsible to release the returned SkBitmap instance.
+ SkBitmap* CaptureWindowImage() const;
+
+ HWND hwnd_;
+ scoped_ptr<SkBitmap> capture_bitmap_;
+
+ DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin);
+};
+
+#endif // CHROME_BROWSER_UI_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_gtk.cc ('k') | chrome/browser/ui/panels/taskbar_window_thumbnailer_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698