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

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

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
« no previous file with comments | « no previous file | chrome/browser/ui/views/panels/panel_stack_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/panels/panel_stack_view.h
diff --git a/chrome/browser/ui/views/panels/panel_stack_view.h b/chrome/browser/ui/views/panels/panel_stack_view.h
index 52c229952b75584f26c3a6a463bbe4d8bbf579b7..a3fff3c1c80081a0fa75d42f3d720d57b02846ea 100644
--- a/chrome/browser/ui/views/panels/panel_stack_view.h
+++ b/chrome/browser/ui/views/panels/panel_stack_view.h
@@ -15,7 +15,10 @@
#include "ui/views/widget/widget_delegate.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 {
class LinearAnimation;
}
@@ -29,6 +32,9 @@ class PanelStackView : public NativePanelStackWindow,
public views::WidgetObserver,
public views::WidgetDelegateView,
public views::WidgetFocusChangeListener,
+#if defined(OS_WIN)
+ public TaskbarWindowThumbnailerDelegateWin,
+#endif
public ui::AnimationDelegate {
public:
explicit PanelStackView(NativePanelStackWindowDelegate* delegate);
@@ -69,8 +75,6 @@ class PanelStackView : public NativePanelStackWindow,
// Overridden from views::WidgetObserver:
virtual void OnWidgetDestroying(views::Widget* widget) OVERRIDE;
- virtual void OnWidgetActivationChanged(views::Widget* widget,
- bool active) OVERRIDE;
// Overridden from views::WidgetFocusChangeListener:
virtual void OnNativeFocusChange(gfx::NativeView focused_before,
@@ -83,6 +87,9 @@ class PanelStackView : public NativePanelStackWindow,
// Updates the bounds of panels as specified in batch update data.
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.
gfx::Rect GetStackWindowBounds() const;
void UpdateStackWindowBounds();
@@ -97,9 +104,12 @@ class PanelStackView : public NativePanelStackWindow,
PanelStackView* stack_window);
#if defined(OS_WIN)
- // Capture the thumbnail of the whole stack and provide it to live preview
- // (available since Windows 7).
- void CaptureThumbnailForLivePreview();
+ // Overridden from TaskbarWindowThumbnailerDelegateWin:
+ virtual std::vector<HWND> GetSnapshotWindowHandles() const OVERRIDE;
+
+ // 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.
void DeferUpdateNativeWindowBounds(HDWP defer_window_pos_info,
@@ -121,7 +131,9 @@ class PanelStackView : public NativePanelStackWindow,
bool is_drawing_attention_;
#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_;
#endif
« no previous file with comments | « no previous file | chrome/browser/ui/views/panels/panel_stack_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698