| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/infobars/infobar_view.h" | 5 #include "chrome/browser/ui/views/infobars/infobar_view.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/tab_contents/infobar_delegate.h" | 9 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h" |
| 10 #include "chrome/browser/ui/views/infobars/infobar_background.h" | 10 #include "chrome/browser/ui/views/infobars/infobar_background.h" |
| 11 #include "chrome/browser/ui/views/infobars/infobar_button_border.h" | 11 #include "chrome/browser/ui/views/infobars/infobar_button_border.h" |
| 12 #include "chrome/browser/ui/views/infobars/infobar_container.h" | 12 #include "chrome/browser/ui/views/infobars/infobar_container.h" |
| 13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
| 14 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
| 15 #include "third_party/skia/include/effects/SkGradientShader.h" | 15 #include "third_party/skia/include/effects/SkGradientShader.h" |
| 16 #include "ui/base/animation/slide_animation.h" | 16 #include "ui/base/animation/slide_animation.h" |
| 17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/base/resource/resource_bundle.h" | 18 #include "ui/base/resource/resource_bundle.h" |
| 19 #include "ui/gfx/canvas_skia_paint.h" | 19 #include "ui/gfx/canvas_skia_paint.h" |
| 20 #include "views/controls/button/image_button.h" | 20 #include "views/controls/button/image_button.h" |
| 21 #include "views/controls/button/menu_button.h" | 21 #include "views/controls/button/menu_button.h" |
| 22 #include "views/controls/button/text_button.h" | 22 #include "views/controls/button/text_button.h" |
| 23 #include "views/controls/image_view.h" | 23 #include "views/controls/image_view.h" |
| 24 #include "views/controls/label.h" | 24 #include "views/controls/label.h" |
| 25 #include "views/controls/link.h" | 25 #include "views/controls/link.h" |
| 26 #include "views/focus/external_focus_tracker.h" | 26 #include "views/focus/external_focus_tracker.h" |
| 27 #include "views/widget/widget.h" | 27 #include "views/widget/widget.h" |
| 28 | 28 |
| 29 #if defined(OS_WIN) | 29 #if defined(OS_WIN) |
| 30 #include <shellapi.h> | 30 #include <shellapi.h> |
| 31 | 31 |
| 32 #include "base/win/win_util.h" | 32 #include "base/win/win_util.h" |
| 33 #include "base/win/windows_version.h" | 33 #include "base/win/windows_version.h" |
| 34 #include "ui/base/win/hwnd_util.h" |
| 34 #include "ui/gfx/icon_util.h" | 35 #include "ui/gfx/icon_util.h" |
| 35 #include "ui/base/win/hwnd_util.h" | |
| 36 #endif | 36 #endif |
| 37 | 37 |
| 38 // static | 38 // static |
| 39 const int InfoBarView::kDefaultTargetHeight = 36; | 39 const int InfoBarView::kDefaultTargetHeight = 36; |
| 40 const int InfoBarView::kButtonButtonSpacing = 10; | 40 const int InfoBarView::kButtonButtonSpacing = 10; |
| 41 const int InfoBarView::kEndOfLabelSpacing = 16; | 41 const int InfoBarView::kEndOfLabelSpacing = 16; |
| 42 const int InfoBarView::kHorizontalPadding = 6; | 42 const int InfoBarView::kHorizontalPadding = 6; |
| 43 | 43 |
| 44 InfoBarView::InfoBarView(InfoBarDelegate* delegate) | 44 InfoBarView::InfoBarView(InfoBarDelegate* delegate) |
| 45 : InfoBar(delegate), | 45 : InfoBar(delegate), |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 if (restore_focus) | 389 if (restore_focus) |
| 390 focus_tracker_->FocusLastFocusedExternalView(); | 390 focus_tracker_->FocusLastFocusedExternalView(); |
| 391 focus_tracker_->SetFocusManager(NULL); | 391 focus_tracker_->SetFocusManager(NULL); |
| 392 focus_tracker_.reset(); | 392 focus_tracker_.reset(); |
| 393 } | 393 } |
| 394 } | 394 } |
| 395 | 395 |
| 396 void InfoBarView::DeleteSelf() { | 396 void InfoBarView::DeleteSelf() { |
| 397 delete this; | 397 delete this; |
| 398 } | 398 } |
| OLD | NEW |