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

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

Issue 8775022: Add Panel::SetPanelBoundsInstantly for all platforms. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 5bcab6c969788442fbc6d0a98affc2d27d6fea95..50d81c2870d2cec0450f2c08ed188e5f58bd4b33 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -66,11 +66,11 @@ const Extension* Panel::GetExtension() const {
return GetExtensionFromBrowser(browser());
}
-void Panel::SetPanelBounds(const gfx::Rect& bounds) {
+void Panel::SetPanelBounds(const gfx::Rect& bounds, bool animate) {
if (expansion_state_ == Panel::EXPANDED)
restored_size_ = bounds.size();
- native_panel_->SetPanelBounds(bounds);
+ native_panel_->SetPanelBounds(bounds, animate);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_PANEL_CHANGED_BOUNDS,
@@ -136,7 +136,7 @@ void Panel::SetExpansionState(ExpansionState new_state) {
gfx::Rect bounds = native_panel_->GetPanelBounds();
bounds.set_y(bottom - height);
bounds.set_height(height);
- SetPanelBounds(bounds);
+ SetPanelBounds(bounds, true); // use animation.
Dmitry Titov 2011/12/01 19:59:51 We tend to do enums instead of bools if callsites
jianli 2011/12/01 20:24:08 Done.
manager()->OnPanelExpansionStateChanged(old_state, new_state);

Powered by Google App Engine
This is Rietveld 408576698