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

Unified Diff: chrome/browser/ui/views/panels/panel_view.cc

Issue 16035007: Provide the custom thumbnail for live preview of stacked panels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 7 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/views/panels/panel_view.cc
diff --git a/chrome/browser/ui/views/panels/panel_view.cc b/chrome/browser/ui/views/panels/panel_view.cc
index 122ce6eb55cf39b12e6f95796f62d031b35738d2..9fa1dbdc845497285168c0d4de2af2c2f80ef837 100644
--- a/chrome/browser/ui/views/panels/panel_view.cc
+++ b/chrome/browser/ui/views/panels/panel_view.cc
@@ -604,6 +604,9 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state,
if (base::win::GetVersion() < base::win::VERSION_WIN7)
return;
+ if (panel_->collection()->type() != PanelCollection::DOCKED)
+ return;
+
bool is_minimized = old_state != Panel::EXPANDED;
bool will_be_minimized = new_state != Panel::EXPANDED;
if (is_minimized == will_be_minimized)
@@ -613,8 +616,7 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state,
if (!thumbnailer_.get()) {
DCHECK(native_window);
- thumbnailer_.reset(new TaskbarWindowThumbnailerWin(native_window));
- ui::HWNDSubclass::AddFilterToTarget(native_window, thumbnailer_.get());
+ thumbnailer_.reset(new TaskbarWindowThumbnailerWin(native_window, NULL));
}
// Cache the image at this point.
@@ -628,8 +630,9 @@ void PanelView::PanelExpansionStateChanging(Panel::ExpansionState old_state,
RDW_NOCHILDREN | RDW_INVALIDATE | RDW_UPDATENOW);
}
- std::vector<HWND> snapshot_hwnds;
- thumbnailer_->Start(snapshot_hwnds);
+ // Start the thumbnailer and capture the snapshot now.
+ thumbnailer_->Start();
+ thumbnailer_->CaptureSnapshot();
} else {
force_to_paint_as_inactive_ = false;
thumbnailer_->Stop();
« no previous file with comments | « chrome/browser/ui/views/panels/panel_stack_view.cc ('k') | chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698