OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/app_launched_animation.h" | 5 #include "chrome/browser/app_launched_animation.h" |
6 | 6 |
7 #include "app/animation.h" | 7 #include "app/animation.h" |
8 #include "app/slide_animation.h" | 8 #include "app/slide_animation.h" |
9 #include "chrome/browser/extensions/image_loading_tracker.h" | 9 #include "chrome/browser/extensions/image_loading_tracker.h" |
10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 popup_->Init(NULL, rect_); | 113 popup_->Init(NULL, rect_); |
114 popup_->SetContentsView(this); | 114 popup_->SetContentsView(this); |
115 popup_->Show(); | 115 popup_->Show(); |
116 | 116 |
117 // Start animation. | 117 // Start animation. |
118 animation_.reset(new SlideAnimation(this)); | 118 animation_.reset(new SlideAnimation(this)); |
119 animation_->SetSlideDuration(kDelayMS + kDurationMS); | 119 animation_->SetSlideDuration(kDelayMS + kDurationMS); |
120 animation_->SetTweenType(Tween::LINEAR); | 120 animation_->SetTweenType(Tween::LINEAR); |
121 animation_->Reset(1.0); | 121 animation_->Reset(1.0); |
122 animation_->Hide(); | 122 animation_->Hide(); |
123 } else { | |
124 popup_->Close(); | |
125 } | 123 } |
126 } | 124 } |
127 | 125 |
128 } // namespace | 126 } // namespace |
129 | 127 |
130 // static | 128 // static |
131 void AppLaunchedAnimation::Show(Extension* extension, const gfx::Rect& rect) { | 129 void AppLaunchedAnimation::Show(Extension* extension, const gfx::Rect& rect) { |
132 // The animation will delete itself when it's finished. | 130 // The animation will delete itself when it's finished. |
133 new AppLaunchedAnimationWin(extension, rect); | 131 new AppLaunchedAnimationWin(extension, rect); |
134 } | 132 } |
OLD | NEW |