OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 // TODO(pkasting): Port Mac to use this. | 7 // TODO(pkasting): Port Mac to use this. |
8 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) | 8 #if defined(TOOLKIT_VIEWS) || defined(TOOLKIT_GTK) |
9 | 9 |
10 #include "chrome/browser/infobars/infobar_container.h" | 10 #include "chrome/browser/infobars/infobar_container.h" |
11 | 11 |
12 #include <algorithm> | 12 #include <algorithm> |
13 | 13 |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "chrome/browser/api/infobars/infobar_delegate.h" | 15 #include "chrome/browser/api/infobars/infobar_delegate.h" |
16 #include "chrome/browser/api/infobars/infobar_service.h" | 16 #include "chrome/browser/api/infobars/infobar_service.h" |
17 #include "chrome/browser/infobars/infobar.h" | 17 #include "chrome/browser/infobars/infobar.h" |
18 #include "chrome/browser/instant/instant_overlay_model.h" | 18 #include "chrome/browser/ui/search/instant_overlay_model.h" |
19 #include "chrome/browser/ui/search/search_model.h" | 19 #include "chrome/browser/ui/search/search_model.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "content/public/browser/notification_details.h" | 21 #include "content/public/browser/notification_details.h" |
22 #include "content/public/browser/notification_source.h" | 22 #include "content/public/browser/notification_source.h" |
23 #include "ui/base/animation/slide_animation.h" | 23 #include "ui/base/animation/slide_animation.h" |
24 | 24 |
25 InfoBarContainer::Delegate::~Delegate() { | 25 InfoBarContainer::Delegate::~Delegate() { |
26 } | 26 } |
27 | 27 |
28 InfoBarContainer::InfoBarContainer( | 28 InfoBarContainer::InfoBarContainer( |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 return InfoBar::kDefaultArrowTargetHeight; | 271 return InfoBar::kDefaultArrowTargetHeight; |
272 // When the first infobar is animating closed, we animate the second infobar's | 272 // When the first infobar is animating closed, we animate the second infobar's |
273 // arrow target height from the default to the top target height. Note that | 273 // arrow target height from the default to the top target height. Note that |
274 // the animation values here are going from 1.0 -> 0.0 as the top bar closes. | 274 // the animation values here are going from 1.0 -> 0.0 as the top bar closes. |
275 return top_arrow_target_height_ + static_cast<int>( | 275 return top_arrow_target_height_ + static_cast<int>( |
276 (InfoBar::kDefaultArrowTargetHeight - top_arrow_target_height_) * | 276 (InfoBar::kDefaultArrowTargetHeight - top_arrow_target_height_) * |
277 first_infobar_animation.GetCurrentValue()); | 277 first_infobar_animation.GetCurrentValue()); |
278 } | 278 } |
279 | 279 |
280 #endif // TOOLKIT_VIEWS || defined(TOOLKIT_GTK) | 280 #endif // TOOLKIT_VIEWS || defined(TOOLKIT_GTK) |
OLD | NEW |