| 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_container_view.h" | 5 #include "chrome/browser/ui/views/infobars/infobar_container_view.h" |
| 6 | 6 |
| 7 #include "cc/paint/paint_flags.h" | 7 #include "cc/paint/paint_flags.h" |
| 8 #include "cc/paint/paint_shader.h" | 8 #include "cc/paint/paint_shader.h" |
| 9 #include "chrome/browser/ui/infobar_container_delegate.h" | 9 #include "chrome/browser/ui/infobar_container_delegate.h" |
| 10 #include "chrome/browser/ui/view_ids.h" | 10 #include "chrome/browser/ui/view_ids.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 content_shadow_->SetBounds(0, top, width(), kLargeShadowHeight); | 117 content_shadow_->SetBounds(0, top, width(), kLargeShadowHeight); |
| 118 } | 118 } |
| 119 | 119 |
| 120 void InfoBarContainerView::GetAccessibleNodeData(ui::AXNodeData* node_data) { | 120 void InfoBarContainerView::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
| 121 node_data->role = ui::AX_ROLE_GROUP; | 121 node_data->role = ui::AX_ROLE_GROUP; |
| 122 node_data->SetName(l10n_util::GetStringUTF8(IDS_ACCNAME_INFOBAR_CONTAINER)); | 122 node_data->SetName(l10n_util::GetStringUTF8(IDS_ACCNAME_INFOBAR_CONTAINER)); |
| 123 } | 123 } |
| 124 | 124 |
| 125 void InfoBarContainerView::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| 126 // Infobars must be redrawn when the NativeTheme changes because |
| 127 // they have a border with color COLOR_TOOLBAR_BOTTOM_SEPARATOR, |
| 128 // which might have changed. |
| 129 for (int i = 0; i < child_count(); ++i) |
| 130 child_at(i)->SchedulePaint(); |
| 131 } |
| 132 |
| 125 void InfoBarContainerView::PlatformSpecificAddInfoBar( | 133 void InfoBarContainerView::PlatformSpecificAddInfoBar( |
| 126 infobars::InfoBar* infobar, | 134 infobars::InfoBar* infobar, |
| 127 size_t position) { | 135 size_t position) { |
| 128 AddChildViewAt(static_cast<InfoBarView*>(infobar), | 136 AddChildViewAt(static_cast<InfoBarView*>(infobar), |
| 129 static_cast<int>(position)); | 137 static_cast<int>(position)); |
| 130 } | 138 } |
| 131 | 139 |
| 132 void InfoBarContainerView::PlatformSpecificRemoveInfoBar( | 140 void InfoBarContainerView::PlatformSpecificRemoveInfoBar( |
| 133 infobars::InfoBar* infobar) { | 141 infobars::InfoBar* infobar) { |
| 134 RemoveChildView(static_cast<InfoBarView*>(infobar)); | 142 RemoveChildView(static_cast<InfoBarView*>(infobar)); |
| 135 } | 143 } |
| OLD | NEW |