| 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) | |
| 11 #include "app/win_util.h" | |
| 12 #endif // defined(OS_WIN) | |
| 13 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 14 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 15 #include "chrome/browser/views/event_utils.h" | 12 #include "chrome/browser/views/event_utils.h" |
| 16 #include "chrome/browser/views/infobars/infobar_container.h" | 13 #include "chrome/browser/views/infobars/infobar_container.h" |
| 17 #include "gfx/canvas.h" | 14 #include "gfx/canvas.h" |
| 18 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
| 19 #include "grit/theme_resources.h" | 16 #include "grit/theme_resources.h" |
| 20 #include "views/background.h" | 17 #include "views/background.h" |
| 21 #include "views/controls/button/image_button.h" | 18 #include "views/controls/button/image_button.h" |
| 22 #include "views/controls/button/native_button.h" | 19 #include "views/controls/button/native_button.h" |
| 23 #include "views/controls/image_view.h" | 20 #include "views/controls/image_view.h" |
| 24 #include "views/controls/label.h" | 21 #include "views/controls/label.h" |
| 25 #include "views/focus/external_focus_tracker.h" | 22 #include "views/focus/external_focus_tracker.h" |
| 26 #include "views/widget/widget.h" | 23 #include "views/widget/widget.h" |
| 27 | 24 |
| 25 #if defined(OS_WIN) |
| 26 #include "app/win_util.h" |
| 27 #endif |
| 28 |
| 28 // static | 29 // static |
| 29 const double InfoBar::kDefaultTargetHeight = 36.0; | 30 const double InfoBar::kDefaultTargetHeight = 36.0; |
| 30 const int InfoBar::kHorizontalPadding = 6; | 31 const int InfoBar::kHorizontalPadding = 6; |
| 31 const int InfoBar::kIconLabelSpacing = 6; | 32 const int InfoBar::kIconLabelSpacing = 6; |
| 32 const int InfoBar::kButtonButtonSpacing = 10; | 33 const int InfoBar::kButtonButtonSpacing = 10; |
| 33 const int InfoBar::kEndOfLabelSpacing = 16; | 34 const int InfoBar::kEndOfLabelSpacing = 16; |
| 34 const int InfoBar::kCloseButtonSpacing = 12; | 35 const int InfoBar::kCloseButtonSpacing = 12; |
| 35 const int InfoBar::kButtonInLabelSpacing = 5; | 36 const int InfoBar::kButtonInLabelSpacing = 5; |
| 36 | 37 |
| 37 static const SkColor kWarningBackgroundColorTop = SkColorSetRGB(255, 242, 183); | 38 static const SkColor kWarningBackgroundColorTop = SkColorSetRGB(255, 242, 183); |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 | 606 |
| 606 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { | 607 InfoBar* LinkInfoBarDelegate::CreateInfoBar() { |
| 607 return new LinkInfoBar(this); | 608 return new LinkInfoBar(this); |
| 608 } | 609 } |
| 609 | 610 |
| 610 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- | 611 // ConfirmInfoBarDelegate, InfoBarDelegate overrides: -------------------------- |
| 611 | 612 |
| 612 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { | 613 InfoBar* ConfirmInfoBarDelegate::CreateInfoBar() { |
| 613 return new ConfirmInfoBar(this); | 614 return new ConfirmInfoBar(this); |
| 614 } | 615 } |
| OLD | NEW |