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

Unified Diff: chrome/browser/ui/panels/panel_browser_window_gtk.cc

Issue 8775022: Add Panel::SetPanelBoundsInstantly for all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 9 years, 1 month 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_window_gtk.cc
diff --git a/chrome/browser/ui/panels/panel_browser_window_gtk.cc b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
index 0726ba3e07274decd5d322b7d234a42dde16b680..a427099677472ceea06713f95ffda5f08f9365fa 100644
--- a/chrome/browser/ui/panels/panel_browser_window_gtk.cc
+++ b/chrome/browser/ui/panels/panel_browser_window_gtk.cc
@@ -245,10 +245,19 @@ gfx::Rect PanelBrowserWindowGtk::GetPanelBounds() const {
}
void PanelBrowserWindowGtk::SetPanelBounds(const gfx::Rect& bounds) {
+ SetBoundsInternal(bounds, true);
+}
+
+void PanelBrowserWindowGtk::SetPanelBoundsInstantly(const gfx::Rect& bounds) {
+ SetBoundsInternal(bounds, false);
+}
+
+void PanelBrowserWindowGtk::SetBoundsInternal(const gfx::Rect& bounds,
+ bool animate) {
if (bounds == bounds_)
return;
- if (drag_widget_) {
+ if (drag_widget_ || !animate) {
DCHECK(!bounds_animator_.get() || !bounds_animator_->is_animating());
// If the current panel is being dragged, it should just move with the
// user drag, we should not animate.

Powered by Google App Engine
This is Rietveld 408576698