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/ui/views/location_bar/content_setting_image_view.h" | 5 #include "chrome/browser/ui/views/location_bar/content_setting_image_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/content_setting_bubble_model.h" | 9 #include "chrome/browser/content_setting_bubble_model.h" |
10 #include "chrome/browser/content_setting_image_model.h" | 10 #include "chrome/browser/content_setting_image_model.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 220 |
221 void ContentSettingImageView::InfoBubbleClosing(InfoBubble* info_bubble, | 221 void ContentSettingImageView::InfoBubbleClosing(InfoBubble* info_bubble, |
222 bool closed_by_escape) { | 222 bool closed_by_escape) { |
223 info_bubble_ = NULL; | 223 info_bubble_ = NULL; |
224 } | 224 } |
225 | 225 |
226 bool ContentSettingImageView::CloseOnEscape() { | 226 bool ContentSettingImageView::CloseOnEscape() { |
227 return true; | 227 return true; |
228 } | 228 } |
229 | 229 |
| 230 bool ContentSettingImageView::FadeInOnShow() { |
| 231 return false; |
| 232 } |
| 233 |
230 void ContentSettingImageView::AnimateToState(double state) { | 234 void ContentSettingImageView::AnimateToState(double state) { |
231 if (state >= 1.0) { | 235 if (state >= 1.0) { |
232 // Animaton is over, clear the variables. | 236 // Animaton is over, clear the variables. |
233 animation_in_progress_ = false; | 237 animation_in_progress_ = false; |
234 visible_text_size_ = 0; | 238 visible_text_size_ = 0; |
235 } else if (state < kAnimatingFraction) { | 239 } else if (state < kAnimatingFraction) { |
236 visible_text_size_ = static_cast<int>(text_size_ * state / | 240 visible_text_size_ = static_cast<int>(text_size_ * state / |
237 kAnimatingFraction); | 241 kAnimatingFraction); |
238 } else if (state > (1.0 - kAnimatingFraction)) { | 242 } else if (state > (1.0 - kAnimatingFraction)) { |
239 visible_text_size_ = static_cast<int>(text_size_ * (1.0 - state) / | 243 visible_text_size_ = static_cast<int>(text_size_ * (1.0 - state) / |
240 kAnimatingFraction); | 244 kAnimatingFraction); |
241 } else { | 245 } else { |
242 visible_text_size_ = text_size_; | 246 visible_text_size_ = text_size_; |
243 } | 247 } |
244 parent_->Layout(); | 248 parent_->Layout(); |
245 parent_->SchedulePaint(); | 249 parent_->SchedulePaint(); |
246 } | 250 } |
247 | 251 |
OLD | NEW |