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

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: 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_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..b3e42a309a0d7da7c8d8c2c0186388c4aeca03bd 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);
@@ -76,6 +82,10 @@ class PanelStackView : public NativePanelStackWindow,
virtual void OnNativeFocusChange(gfx::NativeView focused_before,
gfx::NativeView focused_now) OVERRIDE;
+#if defined(OS_WIN)
Dmitry Titov 2013/05/29 01:14:48 Could you please group all OS_WIN things under a s
jianli 2013/05/29 18:31:52 Done.
+ virtual std::vector<HWND> GetSnapshotWindowHandles() const OVERRIDE;
+#endif
+
// Overridden from AnimationDelegate:
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
@@ -97,9 +107,14 @@ class PanelStackView : public NativePanelStackWindow,
PanelStackView* stack_window);
#if defined(OS_WIN)
+ // If there is a minimized panel in the stack, we want to provide our custom
+ // thumbnail to live preview. This is because the system preview of the
+ // minimized panel is showned up narrower than the regular panel.
+ void StartOrStopCustomThumbnailForMinimizePanel();
+
// Capture the thumbnail of the whole stack and provide it to live preview
// (available since Windows 7).
- void CaptureThumbnailForLivePreview();
+ void CaptureThumbnailForLivePreview(bool should_capture_now);
Dmitry Titov 2013/05/29 01:14:48 This should be named like "StartThumbnailer", beca
// Updates the bounds of the widget window in a deferred way.
void DeferUpdateNativeWindowBounds(HDWP defer_window_pos_info,
@@ -120,6 +135,12 @@ class PanelStackView : public NativePanelStackWindow,
// draw the user's attention?
bool is_drawing_attention_;
+ // True if the system minimize is being performed. On Windows, the system
+ // will activate the window before it is minimized. Sets this flag such that
+ // we will not stop the thumbnailer when the stack windows is activated due
+ // to this.
+ bool is_minimizing_;
+
#if defined(OS_WIN)
// Used to provide custom taskbar thumbnail for Windows 7 and later.
scoped_ptr<TaskbarWindowThumbnailerWin> thumbnailer_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/panels/panel_stack_view.cc » ('j') | chrome/browser/ui/views/panels/panel_stack_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698