diff options
author | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 21:46:31 +0000 |
---|---|---|
committer | jcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-17 21:46:31 +0000 |
commit | 981b34450805e070b6694c8df292f24ee1f73ff4 (patch) | |
tree | ab701ae253823dedbc9f05e416c0ac97f683953c /chrome | |
parent | 422e69530732e4f54acb649ea8130ed22e3ccb53 (diff) | |
download | chromium_src-981b34450805e070b6694c8df292f24ee1f73ff4.zip chromium_src-981b34450805e070b6694c8df292f24ee1f73ff4.tar.gz chromium_src-981b34450805e070b6694c8df292f24ee1f73ff4.tar.bz2 |
Disable app launcher animation on ChromeOS. It causing the app launcher to resize to a wrong size.
BUG=None
TEST=On ChromeOS, press the new tab button, the app launcher should show
correctly.
Review URL: http://codereview.chromium.org/2108007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47460 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/views/app_launcher.cc | 11 | ||||
-rw-r--r-- | chrome/browser/views/app_launcher.h | 5 |
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); }; |