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

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: 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.cc
diff --git a/chrome/browser/ui/panels/panel.cc b/chrome/browser/ui/panels/panel.cc
index 5bcab6c969788442fbc6d0a98affc2d27d6fea95..b9c271fc5e237b2b6c051caffdfb06d535c1f4b9 100644
--- a/chrome/browser/ui/panels/panel.cc
+++ b/chrome/browser/ui/panels/panel.cc
@@ -78,6 +78,18 @@ void Panel::SetPanelBounds(const gfx::Rect& bounds) {
content::NotificationService::NoDetails());
}
+void Panel::SetPanelBoundsInstantly(const gfx::Rect& bounds) {
+ if (expansion_state_ == Panel::EXPANDED)
+ restored_size_ = bounds.size();
+
+ native_panel_->SetPanelBoundsInstantly(bounds);
+
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_PANEL_CHANGED_BOUNDS,
+ content::Source<Panel>(this),
+ content::NotificationService::NoDetails());
+}
+
void Panel::SetAutoResizable(bool resizable) {
if (auto_resizable_ == resizable)
return;

Powered by Google App Engine
This is Rietveld 408576698