summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/views/app_launcher.cc11
-rw-r--r--chrome/browser/views/app_launcher.h5
2 files changed, 15 insertions, 1 deletions
diff --git a/chrome/browser/views/app_launcher.cc b/chrome/browser/views/app_launcher.cc
index e993cdc..5ee038d 100644
--- a/chrome/browser/views/app_launcher.cc
+++ b/chrome/browser/views/app_launcher.cc
@@ -249,8 +249,13 @@ AppLauncher::AppLauncher(Browser* browser)
info_bubble_(NULL) {
DCHECK(browser);
info_bubble_content_ = new InfoBubbleContentsView(this);
+#if defined(OS_WIN)
+ animate_ = true;
animation_.reset(new SlideAnimation(this));
animation_->SetTweenType(Tween::LINEAR);
+#else
+ animate_ = false;
+#endif
}
AppLauncher::~AppLauncher() {
@@ -332,6 +337,12 @@ void AppLauncher::UpdatePreferredSize(const gfx::Size& pref_size) {
previous_contents_pref_size_ = contents_pref_size_;
contents_pref_size_ = pref_size;
+ if (!animate_) {
+ info_bubble_content_->ComputePreferredSize(pref_size);
+ info_bubble_->SizeToContents();
+ return;
+ }
+
int original_height = previous_contents_pref_size_.height();
int new_height = contents_pref_size_.height();
int new_duration;
diff --git a/chrome/browser/views/app_launcher.h b/chrome/browser/views/app_launcher.h
index 8891ec6..a9cbf1d 100644
--- a/chrome/browser/views/app_launcher.h
+++ b/chrome/browser/views/app_launcher.h
@@ -130,9 +130,12 @@ class AppLauncher : public AnimationDelegate,
// The previous preferred size of the DOM contents.
gfx::Size previous_contents_pref_size_;
+ // Whether we should use an animation when showing the info-bubble.
+ bool animate_;
+
// The animation that grows the info-bubble.
scoped_ptr<SlideAnimation> animation_;
-
+
DISALLOW_COPY_AND_ASSIGN(AppLauncher);
};