| Index: chrome/browser/ui/views/infobars/infobar_view.cc
|
| diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
|
| index 9f45fd66c7ae4d6bfe79f1483070ac316c9012db..18fc7c6e45b8ec25dfe56346df03ab1f9d59cc0e 100644
|
| --- a/chrome/browser/ui/views/infobars/infobar_view.cc
|
| +++ b/chrome/browser/ui/views/infobars/infobar_view.cc
|
| @@ -12,8 +12,8 @@
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| -#include "chrome/browser/infobars/infobar_delegate.h"
|
| #include "chrome/browser/ui/views/infobars/infobar_background.h"
|
| +#include "components/infobars/core/infobar_delegate.h"
|
| #include "grit/generated_resources.h"
|
| #include "grit/theme_resources.h"
|
| #include "grit/ui_resources.h"
|
| @@ -57,14 +57,14 @@ bool SortLabelsByDecreasingWidth(views::Label* label_1, views::Label* label_2) {
|
| // InfoBar --------------------------------------------------------------------
|
|
|
| // static
|
| -const int InfoBar::kSeparatorLineHeight =
|
| +const int infobars::InfoBar::kSeparatorLineHeight =
|
| views::NonClientFrameView::kClientEdgeThickness;
|
| -const int InfoBar::kDefaultArrowTargetHeight = 9;
|
| -const int InfoBar::kMaximumArrowTargetHeight = 24;
|
| -const int InfoBar::kDefaultArrowTargetHalfWidth = kDefaultArrowTargetHeight;
|
| -const int InfoBar::kMaximumArrowTargetHalfWidth = 14;
|
| -const int InfoBar::kDefaultBarTargetHeight = 36;
|
| -
|
| +const int infobars::InfoBar::kDefaultArrowTargetHeight = 9;
|
| +const int infobars::InfoBar::kMaximumArrowTargetHeight = 24;
|
| +const int infobars::InfoBar::kDefaultArrowTargetHalfWidth =
|
| + kDefaultArrowTargetHeight;
|
| +const int infobars::InfoBar::kMaximumArrowTargetHalfWidth = 14;
|
| +const int infobars::InfoBar::kDefaultBarTargetHeight = 36;
|
|
|
| // InfoBarView ----------------------------------------------------------------
|
|
|
| @@ -74,13 +74,14 @@ const int InfoBarView::kEndOfLabelSpacing = 16;
|
| const int InfoBarView::kHorizontalPadding = 6;
|
| const int InfoBarView::kCloseButtonSpacing = kEndOfLabelSpacing;
|
|
|
| -InfoBarView::InfoBarView(scoped_ptr<InfoBarDelegate> delegate)
|
| - : InfoBar(delegate.Pass()),
|
| +InfoBarView::InfoBarView(scoped_ptr<infobars::InfoBarDelegate> delegate)
|
| + : infobars::InfoBar(delegate.Pass()),
|
| views::ExternalFocusTracker(this, NULL),
|
| icon_(NULL),
|
| close_button_(NULL) {
|
| set_owned_by_client(); // InfoBar deletes itself at the appropriate time.
|
| - set_background(new InfoBarBackground(InfoBar::delegate()->GetInfoBarType()));
|
| + set_background(
|
| + new InfoBarBackground(infobars::InfoBar::delegate()->GetInfoBarType()));
|
| }
|
|
|
| InfoBarView::~InfoBarView() {
|
| @@ -213,7 +214,7 @@ void InfoBarView::Layout() {
|
| // width is changed, which affects both paths.
|
| stroke_path_.rewind();
|
| fill_path_.rewind();
|
| - const InfoBarContainer::Delegate* delegate = container_delegate();
|
| + const infobars::InfoBarContainer::Delegate* delegate = container_delegate();
|
| if (delegate) {
|
| static_cast<InfoBarBackground*>(background())->set_separator_color(
|
| delegate->GetInfoBarSeparatorColor());
|
| @@ -357,8 +358,9 @@ int InfoBarView::OffsetY(views::View* view) const {
|
| (bar_target_height() - bar_height());
|
| }
|
|
|
| -const InfoBarContainer::Delegate* InfoBarView::container_delegate() const {
|
| - const InfoBarContainer* infobar_container = container();
|
| +const infobars::InfoBarContainer::Delegate* InfoBarView::container_delegate()
|
| + const {
|
| + const infobars::InfoBarContainer* infobar_container = container();
|
| return infobar_container ? infobar_container->delegate() : NULL;
|
| }
|
|
|
| @@ -426,7 +428,8 @@ void InfoBarView::PlatformSpecificOnHeightsRecalculated() {
|
|
|
| void InfoBarView::GetAccessibleState(ui::AXViewState* state) {
|
| state->name = l10n_util::GetStringUTF16(
|
| - (delegate()->GetInfoBarType() == InfoBarDelegate::WARNING_TYPE) ?
|
| + (delegate()->GetInfoBarType() ==
|
| + infobars::InfoBarDelegate::WARNING_TYPE) ?
|
| IDS_ACCNAME_INFOBAR_WARNING : IDS_ACCNAME_INFOBAR_PAGE_ACTION);
|
| state->role = ui::AX_ROLE_ALERT;
|
| }
|
|
|