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/views/infobars/infobars.h" | 5 #include "chrome/browser/views/infobars/infobars.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "app/slide_animation.h" | 9 #include "app/slide_animation.h" |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 close_button_->SetImage(views::CustomButton::BS_NORMAL, | 129 close_button_->SetImage(views::CustomButton::BS_NORMAL, |
130 rb.GetBitmapNamed(IDR_CLOSE_BAR)); | 130 rb.GetBitmapNamed(IDR_CLOSE_BAR)); |
131 close_button_->SetImage(views::CustomButton::BS_HOT, | 131 close_button_->SetImage(views::CustomButton::BS_HOT, |
132 rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); | 132 rb.GetBitmapNamed(IDR_CLOSE_BAR_H)); |
133 close_button_->SetImage(views::CustomButton::BS_PUSHED, | 133 close_button_->SetImage(views::CustomButton::BS_PUSHED, |
134 rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); | 134 rb.GetBitmapNamed(IDR_CLOSE_BAR_P)); |
135 close_button_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_CLOSE)); | 135 close_button_->SetAccessibleName(l10n_util::GetString(IDS_ACCNAME_CLOSE)); |
136 AddChildView(close_button_); | 136 AddChildView(close_button_); |
137 | 137 |
138 animation_.reset(new SlideAnimation(this)); | 138 animation_.reset(new SlideAnimation(this)); |
139 animation_->SetTweenType(SlideAnimation::NONE); | 139 animation_->SetTweenType(Tween::LINEAR); |
140 } | 140 } |
141 | 141 |
142 InfoBar::~InfoBar() { | 142 InfoBar::~InfoBar() { |
143 } | 143 } |
144 | 144 |
145 void InfoBar::AnimateOpen() { | 145 void InfoBar::AnimateOpen() { |
146 animation_->Show(); | 146 animation_->Show(); |
147 } | 147 } |
148 | 148 |
149 void InfoBar::Open() { | 149 void InfoBar::Open() { |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 | 591 |
592 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { | 592 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { |
593 return new LinkInfoBar(this); | 593 return new LinkInfoBar(this); |
594 } | 594 } |
595 | 595 |
596 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- | 596 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- |
597 | 597 |
598 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { | 598 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { |
599 return new ConfirmInfoBar(this); | 599 return new ConfirmInfoBar(this); |
600 } | 600 } |
OLD | NEW |