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

Unified Diff: chrome/browser/ui/panels/panel_browser_view.h

Issue 10408047: Fix bug 105043: Panels [WIN]: For minimize panels, taskbar hover preview show the 4-pixel represent… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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/panels/panel_browser_view.h
diff --git a/chrome/browser/ui/panels/panel_browser_view.h b/chrome/browser/ui/panels/panel_browser_view.h
index ab2aa634766b48f57fcd078c5655792d80261e4e..5a5d82c0fa9dbec699f44f6a0f59b7097826ee1a 100644
--- a/chrome/browser/ui/panels/panel_browser_view.h
+++ b/chrome/browser/ui/panels/panel_browser_view.h
@@ -32,6 +32,9 @@ class PanelBrowserView : public BrowserView,
Panel* panel() const { return panel_.get(); }
bool closed() const { return closed_; }
bool focused() const { return focused_; }
+ bool force_to_paint_as_inactive() const {
+ return force_to_paint_as_inactive_;
+ }
PanelBrowserFrameView* GetFrameView() const;
@@ -80,6 +83,7 @@ class PanelBrowserView : public BrowserView,
virtual bool WillProcessWorkAreaChange() const OVERRIDE;
virtual void OnWindowBeginUserBoundsChange() OVERRIDE;
virtual void OnWindowEndUserBoundsChange() OVERRIDE;
+ virtual SkBitmap GetPreviewImage(const gfx::Size& size, bool live) OVERRIDE;
// Overridden from views::Widget::Observer
virtual void OnWidgetActivationChanged(views::Widget* widget,
@@ -125,6 +129,9 @@ class PanelBrowserView : public BrowserView,
virtual void SetPanelAlwaysOnTop(bool on_top) OVERRIDE;
virtual void EnableResizeByMouse(bool enable) OVERRIDE;
virtual void UpdatePanelMinimizeRestoreButtonVisibility() OVERRIDE;
+ virtual void PanelExpansionStateChanging(
+ Panel::ExpansionState old_state,
+ Panel::ExpansionState new_state) OVERRIDE;
// Overridden from AnimationDelegate:
virtual void AnimationEnded(const ui::Animation* animation) OVERRIDE;
@@ -145,6 +152,10 @@ class PanelBrowserView : public BrowserView,
void UpdateWindowAttribute(int attribute_index,
int attribute_value,
bool to_set);
+
+ // Captures and returns the screenshot of the panel window. The caller is
+ // responsible to release the returned SkBitmap instance.
+ SkBitmap CaptureWindowImage();
#endif
scoped_ptr<Panel> panel_;
@@ -175,12 +186,22 @@ class PanelBrowserView : public BrowserView,
// Is the panel in highlighted state to draw people's attention?
bool is_drawing_attention_;
+ // Should we force to paint the panel as inactive? This is needed when we need
+ // to capture the screenshot before an active panel goes minimized.
+ bool force_to_paint_as_inactive_;
+
// The last view that had focus in the panel. This is saved so that focus can
// be restored properly when a drag ends.
views::View* old_focused_view_;
content::NotificationRegistrar registrar_;
+#if defined(OS_WIN) && !defined(USE_AURA)
+ // The bitmap of panel screenshot before it is minimized. This is used to
+ // replace the live preview thumbnail when the panel is minimized.
+ scoped_ptr<SkBitmap> capture_bitmap_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(PanelBrowserView);
};

Powered by Google App Engine
This is Rietveld 408576698