Commit 1764980d authored by jianli@chromium.org's avatar jianli@chromium.org

We now changed to always provide the custom thumbnail for stacked panels.

The following issues have been fixed:
1) If one or more panels in the stack are collapsed, the live preview is not shown correctly.
2) If the whole stack is minimized by the system, the live preview is not shown correctly.

BUG=177743
TEST=Manual tests by collapsing a panel or system-minimzing a stack and then hover over the taskbar icon

Review URL: https://chromiumcodereview.appspot.com/16035007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203016 0039d316-1c4b-4281-b951-d872f2087c98
parent 40b389af
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#if defined(OS_WIN) #if defined(OS_WIN)
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "chrome/browser/shell_integration.h" #include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h"
#include "ui/base/win/shell.h" #include "ui/base/win/shell.h"
#include "ui/views/win/hwnd_util.h" #include "ui/views/win/hwnd_util.h"
#endif #endif
...@@ -152,7 +151,7 @@ void PanelStackView::EndBatchUpdatePanelBounds() { ...@@ -152,7 +151,7 @@ void PanelStackView::EndBatchUpdatePanelBounds() {
} }
bounds_updates_started_ = false; bounds_updates_started_ = false;
delegate_->PanelBoundsBatchUpdateCompleted(); NotifyBoundsUpdateCompleted();
return; return;
} }
...@@ -163,16 +162,25 @@ void PanelStackView::EndBatchUpdatePanelBounds() { ...@@ -163,16 +162,25 @@ void PanelStackView::EndBatchUpdatePanelBounds() {
bounds_animator_->Start(); bounds_animator_->Start();
} }
void PanelStackView::NotifyBoundsUpdateCompleted() {
delegate_->PanelBoundsBatchUpdateCompleted();
#if defined(OS_WIN)
// Refresh the thumbnail each time when any bounds updates are done.
RefreshLivePreviewThumbnail();
#endif
}
bool PanelStackView::IsAnimatingPanelBounds() const { bool PanelStackView::IsAnimatingPanelBounds() const {
return bounds_updates_started_ && animate_bounds_updates_; return bounds_updates_started_ && animate_bounds_updates_;
} }
void PanelStackView::Minimize() { void PanelStackView::Minimize() {
#if defined(OS_WIN) #if defined(OS_WIN)
// When the owner stack window is minimized by the system, its live preview // When the stack window is minimized by the system, its snapshot could not
// is lost. We need to set it explicitly. This has to be done before the // be obtained. We need to capture the snapshot before the minimization.
// minimization. if (thumbnailer_)
CaptureThumbnailForLivePreview(); thumbnailer_->CaptureSnapshot();
#endif #endif
window_->Minimize(); window_->Minimize();
...@@ -190,6 +198,10 @@ void PanelStackView::DrawSystemAttention(bool draw_attention) { ...@@ -190,6 +198,10 @@ void PanelStackView::DrawSystemAttention(bool draw_attention) {
is_drawing_attention_ = draw_attention; is_drawing_attention_ = draw_attention;
#if defined(OS_WIN) #if defined(OS_WIN)
// Refresh the thumbnail when a panel could change something for the
// attention.
RefreshLivePreviewThumbnail();
if (draw_attention) { if (draw_attention) {
// The default implementation of Widget::FlashFrame only flashes 5 times. // The default implementation of Widget::FlashFrame only flashes 5 times.
// We need more than that. // We need more than that.
...@@ -270,14 +282,6 @@ void PanelStackView::OnWidgetDestroying(views::Widget* widget) { ...@@ -270,14 +282,6 @@ void PanelStackView::OnWidgetDestroying(views::Widget* widget) {
window_ = NULL; window_ = NULL;
} }
void PanelStackView::OnWidgetActivationChanged(views::Widget* widget,
bool active) {
#if defined(OS_WIN)
if (active && thumbnailer_)
thumbnailer_->Stop();
#endif
}
void PanelStackView::OnNativeFocusChange(gfx::NativeView focused_before, void PanelStackView::OnNativeFocusChange(gfx::NativeView focused_before,
gfx::NativeView focused_now) { gfx::NativeView focused_now) {
// When the user selects the stacked panels via ALT-TAB or WIN-TAB, the // When the user selects the stacked panels via ALT-TAB or WIN-TAB, the
...@@ -306,7 +310,7 @@ void PanelStackView::AnimationEnded(const ui::Animation* animation) { ...@@ -306,7 +310,7 @@ void PanelStackView::AnimationEnded(const ui::Animation* animation) {
} }
bounds_updates_.clear(); bounds_updates_.clear();
delegate_->PanelBoundsBatchUpdateCompleted(); NotifyBoundsUpdateCompleted();
} }
void PanelStackView::AnimationProgressed(const ui::Animation* animation) { void PanelStackView::AnimationProgressed(const ui::Animation* animation) {
...@@ -378,6 +382,12 @@ gfx::Rect PanelStackView::GetStackWindowBounds() const { ...@@ -378,6 +382,12 @@ gfx::Rect PanelStackView::GetStackWindowBounds() const {
void PanelStackView::UpdateStackWindowBounds() { void PanelStackView::UpdateStackWindowBounds() {
window_->SetBounds(GetStackWindowBounds()); window_->SetBounds(GetStackWindowBounds());
#if defined(OS_WIN)
// Refresh the thumbnail each time whne the stack window is changed, due to
// adding or removing a panel.
RefreshLivePreviewThumbnail();
#endif
} }
// static // static
...@@ -440,6 +450,12 @@ views::Widget* PanelStackView::CreateWindowWithBounds(const gfx::Rect& bounds) { ...@@ -440,6 +450,12 @@ views::Widget* PanelStackView::CreateWindowWithBounds(const gfx::Rect& bounds) {
ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(panel->app_name()), ShellIntegration::GetAppModelIdForProfile(UTF8ToWide(panel->app_name()),
panel->profile()->GetPath()), panel->profile()->GetPath()),
views::HWNDForWidget(window)); views::HWNDForWidget(window));
if (base::win::GetVersion() >= base::win::VERSION_WIN7) {
HWND native_window = views::HWNDForWidget(window);
thumbnailer_.reset(new TaskbarWindowThumbnailerWin(native_window, this));
thumbnailer_->Start();
}
#endif #endif
return window; return window;
...@@ -455,19 +471,7 @@ void PanelStackView::EnsureWindowCreated() { ...@@ -455,19 +471,7 @@ void PanelStackView::EnsureWindowCreated() {
} }
#if defined(OS_WIN) #if defined(OS_WIN)
void PanelStackView::CaptureThumbnailForLivePreview() { std::vector<HWND> PanelStackView::GetSnapshotWindowHandles() const {
// Live preview is only available since Windows 7.
if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
HWND native_window = views::HWNDForWidget(window_);
if (!thumbnailer_.get()) {
DCHECK(native_window);
thumbnailer_.reset(new TaskbarWindowThumbnailerWin(native_window));
ui::HWNDSubclass::AddFilterToTarget(native_window, thumbnailer_.get());
}
std::vector<HWND> native_panel_windows; std::vector<HWND> native_panel_windows;
for (Panels::const_iterator iter = panels_.begin(); for (Panels::const_iterator iter = panels_.begin();
iter != panels_.end(); ++iter) { iter != panels_.end(); ++iter) {
...@@ -476,7 +480,13 @@ void PanelStackView::CaptureThumbnailForLivePreview() { ...@@ -476,7 +480,13 @@ void PanelStackView::CaptureThumbnailForLivePreview() {
views::HWNDForWidget( views::HWNDForWidget(
static_cast<PanelView*>(panel->native_panel())->window())); static_cast<PanelView*>(panel->native_panel())->window()));
} }
thumbnailer_->Start(native_panel_windows); return native_panel_windows;
}
void PanelStackView::RefreshLivePreviewThumbnail() {
if (!thumbnailer_.get())
return;
thumbnailer_->InvalidateSnapshot();
} }
void PanelStackView::DeferUpdateNativeWindowBounds(HDWP defer_window_pos_info, void PanelStackView::DeferUpdateNativeWindowBounds(HDWP defer_window_pos_info,
......
...@@ -15,7 +15,10 @@ ...@@ -15,7 +15,10 @@
#include "ui/views/widget/widget_delegate.h" #include "ui/views/widget/widget_delegate.h"
#include "ui/views/widget/widget_observer.h" #include "ui/views/widget/widget_observer.h"
class TaskbarWindowThumbnailerWin; #if defined(OS_WIN)
#include "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h"
#endif
namespace ui { namespace ui {
class LinearAnimation; class LinearAnimation;
} }
...@@ -29,6 +32,9 @@ class PanelStackView : public NativePanelStackWindow, ...@@ -29,6 +32,9 @@ class PanelStackView : public NativePanelStackWindow,
public views::WidgetObserver, public views::WidgetObserver,
public views::WidgetDelegateView, public views::WidgetDelegateView,
public views::WidgetFocusChangeListener, public views::WidgetFocusChangeListener,
#if defined(OS_WIN)
public TaskbarWindowThumbnailerDelegateWin,
#endif
public ui::AnimationDelegate { public ui::AnimationDelegate {
public: public:
explicit PanelStackView(NativePanelStackWindowDelegate* delegate); explicit PanelStackView(NativePanelStackWindowDelegate* delegate);
...@@ -69,8 +75,6 @@ class PanelStackView : public NativePanelStackWindow, ...@@ -69,8 +75,6 @@ class PanelStackView : public NativePanelStackWindow,
// Overridden from views::WidgetObserver: // Overridden from views::WidgetObserver:
virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE; virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
virtual void OnWidgetActivationChanged(views::Widget* widget,
bool active) OVERRIDE;
// Overridden from views::WidgetFocusChangeListener: // Overridden from views::WidgetFocusChangeListener:
virtual void OnNativeFocusChange(gfx::NativeView focused_before, virtual void OnNativeFocusChange(gfx::NativeView focused_before,
...@@ -83,6 +87,9 @@ class PanelStackView : public NativePanelStackWindow, ...@@ -83,6 +87,9 @@ class PanelStackView : public NativePanelStackWindow,
// Updates the bounds of panels as specified in batch update data. // Updates the bounds of panels as specified in batch update data.
void UpdatePanelsBounds(); void UpdatePanelsBounds();
// Notifies the delegate that the updates of the panel bounds are completed.
void NotifyBoundsUpdateCompleted();
// Computes/updates the minimum bounds that could fit all panels. // Computes/updates the minimum bounds that could fit all panels.
gfx::Rect GetStackWindowBounds() const; gfx::Rect GetStackWindowBounds() const;
void UpdateStackWindowBounds(); void UpdateStackWindowBounds();
...@@ -97,9 +104,12 @@ class PanelStackView : public NativePanelStackWindow, ...@@ -97,9 +104,12 @@ class PanelStackView : public NativePanelStackWindow,
PanelStackView* stack_window); PanelStackView* stack_window);
#if defined(OS_WIN) #if defined(OS_WIN)
// Capture the thumbnail of the whole stack and provide it to live preview // Overridden from TaskbarWindowThumbnailerDelegateWin:
// (available since Windows 7). virtual std::vector<HWND> GetSnapshotWindowHandles() const OVERRIDE;
void CaptureThumbnailForLivePreview();
// Updates the live preview snapshot when something changes, like
// adding/removing/moving/resizing a stacked panel.
void RefreshLivePreviewThumbnail();
// Updates the bounds of the widget window in a deferred way. // Updates the bounds of the widget window in a deferred way.
void DeferUpdateNativeWindowBounds(HDWP defer_window_pos_info, void DeferUpdateNativeWindowBounds(HDWP defer_window_pos_info,
...@@ -121,7 +131,9 @@ class PanelStackView : public NativePanelStackWindow, ...@@ -121,7 +131,9 @@ class PanelStackView : public NativePanelStackWindow,
bool is_drawing_attention_; bool is_drawing_attention_;
#if defined(OS_WIN) #if defined(OS_WIN)
// Used to provide custom taskbar thumbnail for Windows 7 and later. // The custom live preview snapshot is always provided for the stack window.
// This is because the system might not show the snapshot correctly for
// a small window, like collapsed panel.
scoped_ptr<TaskbarWindowThumbnailerWin> thumbnailer_; scoped_ptr<TaskbarWindowThumbnailerWin> thumbnailer_;
#endif #endif
......
...@@ -604,6 +604,9 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state, ...@@ -604,6 +604,9 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state,
if (base::win::GetVersion() < base::win::VERSION_WIN7) if (base::win::GetVersion() < base::win::VERSION_WIN7)
return; return;
if (panel_->collection()->type() != PanelCollection::DOCKED)
return;
bool is_minimized = old_state != Panel::EXPANDED; bool is_minimized = old_state != Panel::EXPANDED;
bool will_be_minimized = new_state != Panel::EXPANDED; bool will_be_minimized = new_state != Panel::EXPANDED;
if (is_minimized == will_be_minimized) if (is_minimized == will_be_minimized)
...@@ -613,8 +616,7 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state, ...@@ -613,8 +616,7 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state,
if (!thumbnailer_.get()) { if (!thumbnailer_.get()) {
DCHECK(native_window); DCHECK(native_window);
thumbnailer_.reset(new TaskbarWindowThumbnailerWin(native_window)); thumbnailer_.reset(new TaskbarWindowThumbnailerWin(native_window, NULL));
ui::HWNDSubclass::AddFilterToTarget(native_window, thumbnailer_.get());
} }
// Cache the image at this point. // Cache the image at this point.
...@@ -628,8 +630,9 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state, ...@@ -628,8 +630,9 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state,
RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW); RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
} }
std::vector<HWND> snapshot_hwnds; // Start the thumbnailer and capture the snapshot now.
thumbnailer_->Start(snapshot_hwnds); thumbnailer_->Start();
thumbnailer_->CaptureSnapshot();
} else { } else {
force_to_paint_as_inactive_ = false; force_to_paint_as_inactive_ = false;
thumbnailer_->Stop(); thumbnailer_->Stop();
......
...@@ -50,21 +50,19 @@ void EnableCustomThumbnail(HWND hwnd, bool enable) { ...@@ -50,21 +50,19 @@ void EnableCustomThumbnail(HWND hwnd, bool enable) {
} // namespace } // namespace
TaskbarWindowThumbnailerWin::TaskbarWindowThumbnailerWin(HWND hwnd) TaskbarWindowThumbnailerWin::TaskbarWindowThumbnailerWin(
: hwnd_(hwnd) { HWND hwnd, TaskbarWindowThumbnailerDelegateWin* delegate)
: hwnd_(hwnd),
delegate_(delegate) {
ui::HWNDSubclass::AddFilterToTarget(hwnd_, this);
} }
TaskbarWindowThumbnailerWin::~TaskbarWindowThumbnailerWin() { TaskbarWindowThumbnailerWin::~TaskbarWindowThumbnailerWin() {
ui::HWNDSubclass::RemoveFilterFromAllTargets(this);
} }
void TaskbarWindowThumbnailerWin::Start( void TaskbarWindowThumbnailerWin::Start() {
const std::vector<HWND>& snapshot_hwnds) { EnableCustomThumbnail(hwnd_, true);
snapshot_hwnds_ = snapshot_hwnds;
if (snapshot_hwnds_.empty())
snapshot_hwnds_.push_back(hwnd_);
capture_bitmap_.reset(CaptureWindowImage());
if (capture_bitmap_)
EnableCustomThumbnail(hwnd_, true);
} }
void TaskbarWindowThumbnailerWin::Stop() { void TaskbarWindowThumbnailerWin::Stop() {
...@@ -72,6 +70,18 @@ void TaskbarWindowThumbnailerWin::Stop() { ...@@ -72,6 +70,18 @@ void TaskbarWindowThumbnailerWin::Stop() {
EnableCustomThumbnail(hwnd_, false); EnableCustomThumbnail(hwnd_, false);
} }
void TaskbarWindowThumbnailerWin::CaptureSnapshot() {
if (!capture_bitmap_)
capture_bitmap_.reset(CaptureWindowImage());
}
void TaskbarWindowThumbnailerWin::InvalidateSnapshot() {
capture_bitmap_.reset();
// The snapshot feeded to the system could be cached. Invalidate it.
::DwmInvalidateIconicBitmaps(hwnd_);
}
bool TaskbarWindowThumbnailerWin::FilterMessage(HWND hwnd, bool TaskbarWindowThumbnailerWin::FilterMessage(HWND hwnd,
UINT message, UINT message,
WPARAM w_param, WPARAM w_param,
...@@ -91,7 +101,7 @@ bool TaskbarWindowThumbnailerWin::FilterMessage(HWND hwnd, ...@@ -91,7 +101,7 @@ bool TaskbarWindowThumbnailerWin::FilterMessage(HWND hwnd,
bool TaskbarWindowThumbnailerWin::OnDwmSendIconicThumbnail( bool TaskbarWindowThumbnailerWin::OnDwmSendIconicThumbnail(
int width, int height, LRESULT* l_result) { int width, int height, LRESULT* l_result) {
DCHECK(capture_bitmap_.get()); CaptureSnapshot();
SkBitmap* thumbnail_bitmap = capture_bitmap_.get(); SkBitmap* thumbnail_bitmap = capture_bitmap_.get();
...@@ -119,26 +129,32 @@ bool TaskbarWindowThumbnailerWin::OnDwmSendIconicThumbnail( ...@@ -119,26 +129,32 @@ bool TaskbarWindowThumbnailerWin::OnDwmSendIconicThumbnail(
bool TaskbarWindowThumbnailerWin::OnDwmSendIconicLivePreviewBitmap( bool TaskbarWindowThumbnailerWin::OnDwmSendIconicLivePreviewBitmap(
LRESULT* l_result) { LRESULT* l_result) {
scoped_ptr<SkBitmap> live_bitmap(CaptureWindowImage()); CaptureSnapshot();
HBITMAP native_bitmap = GetNativeBitmapFromSkBitmap(*live_bitmap);
HBITMAP native_bitmap = GetNativeBitmapFromSkBitmap(*capture_bitmap_);
::DwmSetIconicLivePreviewBitmap(hwnd_, native_bitmap, NULL, 0); ::DwmSetIconicLivePreviewBitmap(hwnd_, native_bitmap, NULL, 0);
::DeleteObject(native_bitmap); ::DeleteObject(native_bitmap);
*l_result = 0; *l_result = 0;
return true; return true;
} }
SkBitmap* TaskbarWindowThumbnailerWin::CaptureWindowImage() const { SkBitmap* TaskbarWindowThumbnailerWin::CaptureWindowImage() const {
std::vector<HWND> snapshot_hwnds;
if (delegate_)
snapshot_hwnds = delegate_->GetSnapshotWindowHandles();
if (snapshot_hwnds.empty())
snapshot_hwnds.push_back(hwnd_);
int enclosing_x = 0; int enclosing_x = 0;
int enclosing_y = 0; int enclosing_y = 0;
int enclosing_right = 0; int enclosing_right = 0;
int enclosing_bottom = 0; int enclosing_bottom = 0;
for (std::vector<HWND>::const_iterator iter = snapshot_hwnds_.begin(); for (std::vector<HWND>::const_iterator iter = snapshot_hwnds.begin();
iter != snapshot_hwnds_.end(); ++iter) { iter != snapshot_hwnds.end(); ++iter) {
RECT bounds; RECT bounds;
if (!::GetWindowRect(*iter, &bounds)) if (!::GetWindowRect(*iter, &bounds))
continue; continue;
if (iter == snapshot_hwnds_.begin()) { if (iter == snapshot_hwnds.begin()) {
enclosing_x = bounds.left; enclosing_x = bounds.left;
enclosing_y = bounds.top; enclosing_y = bounds.top;
enclosing_right = bounds.right; enclosing_right = bounds.right;
...@@ -164,8 +180,8 @@ SkBitmap* TaskbarWindowThumbnailerWin::CaptureWindowImage() const { ...@@ -164,8 +180,8 @@ SkBitmap* TaskbarWindowThumbnailerWin::CaptureWindowImage() const {
{ {
skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas()); skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas());
HDC target_dc = scoped_platform_paint.GetPlatformSurface(); HDC target_dc = scoped_platform_paint.GetPlatformSurface();
for (std::vector<HWND>::const_iterator iter = snapshot_hwnds_.begin(); for (std::vector<HWND>::const_iterator iter = snapshot_hwnds.begin();
iter != snapshot_hwnds_.end(); ++iter) { iter != snapshot_hwnds.end(); ++iter) {
HWND current_hwnd = *iter; HWND current_hwnd = *iter;
RECT current_bounds; RECT current_bounds;
if (!::GetWindowRect(current_hwnd, &current_bounds)) if (!::GetWindowRect(current_hwnd, &current_bounds))
......
...@@ -11,19 +11,37 @@ ...@@ -11,19 +11,37 @@
class SkBitmap; 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 // Provides the custom thumbnail and live preview for the window that appears
// in the taskbar (Windows 7 and later). // in the taskbar (Windows 7 and later).
class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter {
public: public:
explicit TaskbarWindowThumbnailerWin(HWND hwnd); TaskbarWindowThumbnailerWin(HWND hwnd,
TaskbarWindowThumbnailerDelegateWin* delegate);
virtual ~TaskbarWindowThumbnailerWin(); virtual ~TaskbarWindowThumbnailerWin();
// Use the snapshots from all the windows in |snapshot_hwnds| to construct // Starts using the custom snapshot for live preview. The snapshot is only
// the thumbnail. If |snapshot_hwnds| is empty, use the snapshot of current // captured once when the system requests it, so the updates of the panels'
// window. // content will not be automatically reflected in the thumbnail.
void Start(const std::vector<HWND>& snapshot_hwnds); void Start();
// Stops providing the custom snapshot for live preview.
void Stop(); 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();
private: private:
// Overridden from ui::HWNDMessageFilter: // Overridden from ui::HWNDMessageFilter:
virtual bool FilterMessage(HWND hwnd, virtual bool FilterMessage(HWND hwnd,
...@@ -33,8 +51,7 @@ class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { ...@@ -33,8 +51,7 @@ class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter {
LRESULT* l_result) OVERRIDE; LRESULT* l_result) OVERRIDE;
// Message handlers. // Message handlers.
bool OnDwmSendIconicThumbnail( bool OnDwmSendIconicThumbnail(int width, int height, LRESULT* l_result);
int width, int height, LRESULT* l_result);
bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result); bool OnDwmSendIconicLivePreviewBitmap(LRESULT* l_result);
// Captures and returns the screenshot of the window. The caller is // Captures and returns the screenshot of the window. The caller is
...@@ -42,7 +59,7 @@ class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter { ...@@ -42,7 +59,7 @@ class TaskbarWindowThumbnailerWin : public ui::HWNDMessageFilter {
SkBitmap* CaptureWindowImage() const; SkBitmap* CaptureWindowImage() const;
HWND hwnd_; HWND hwnd_;
std::vector<HWND> snapshot_hwnds_; TaskbarWindowThumbnailerDelegateWin* delegate_; // Weak, owns us.
scoped_ptr<SkBitmap> capture_bitmap_; scoped_ptr<SkBitmap> capture_bitmap_;
DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin); DISALLOW_COPY_AND_ASSIGN(TaskbarWindowThumbnailerWin);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment