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

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

Issue 2263863002: Remove implementation of Panels on OSes other than ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR feedback Created 4 years, 4 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/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
deleted file mode 100644
index 59822deb0f0bcc6ef66b72753572428d3cfb7a29..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h
+++ /dev/null
@@ -1,74 +0,0 @@
-// 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_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_
-#define CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_
-
-#include <memory>
-#include <vector>
-
-#include "base/macros.h"
-#include "ui/base/win/hwnd_subclass.h"
-
-class SkBitmap;
-
-class TaskbarWindowThumbnailerDelegateWin {
- public:
- // Returns the list of handles for 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:
- TaskbarWindowThumbnailerWin(HWND hwnd,
- TaskbarWindowThumbnailerDelegateWin* delegate);
- ~TaskbarWindowThumbnailerWin() override;
-
- // Starts using the custom snapshot for live preview. The snapshot is only
- // captured once when the system requests it, so the updates of the panels'
- // content will not be automatically reflected in the thumbnail.
- void Start();
-
- // Stops providing the custom snapshot for live preview.
- void Stop();
-
- // Captures the snapshot now instead of when the system requests it.
- void CaptureSnapshot();
-
- // Invalidates the snapshot such that a fresh copy can be obtained next time
- // when the system requests it.
- void InvalidateSnapshot();
-
- // Provide the snapshot to the new window. If the snapshot is captured for the
- // old window, it will also be used for the new window.
- void ReplaceWindow(HWND new_hwnd);
-
- private:
- // Overridden from ui::HWNDMessageFilter:
- 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_;
- TaskbarWindowThumbnailerDelegateWin* delegate_; // Weak, owns us.
- std::unique_ptr<SkBitmap> capture_bitmap_;
-
- DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin);
-};
-
-#endif // CHROME_BROWSER_UI_VIEWS_PANELS_TASKBAR_WINDOW_THUMBNAILER_WIN_H_

Powered by Google App Engine
This is Rietveld 408576698