| 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 "chrome/browser/ui/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
| 8 #include "chrome/browser/ui/views/infobars/infobar_view.h" | 8 #include "chrome/browser/ui/views/infobars/infobar_view.h" |
| 9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 10 #include "ui/base/accessibility/accessible_view_state.h" | 10 #include "ui/base/accessibility/accessible_view_state.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 child->SetBounds(0, top, width(), child_height); | 37 child->SetBounds(0, top, width(), child_height); |
| 38 top += child_height; | 38 top += child_height; |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 | 41 |
| 42 void InfoBarContainerView::GetAccessibleState(ui::AccessibleViewState* state) { | 42 void InfoBarContainerView::GetAccessibleState(ui::AccessibleViewState* state) { |
| 43 state->role = ui::AccessibilityTypes::ROLE_GROUPING; | 43 state->role = ui::AccessibilityTypes::ROLE_GROUPING; |
| 44 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_INFOBAR_CONTAINER); | 44 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_INFOBAR_CONTAINER); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar) { | 47 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar, |
| 48 AddChildView(static_cast<InfoBarView*>(infobar)); | 48 size_t position) { |
| 49 AddChildViewAt(static_cast<InfoBarView*>(infobar), |
| 50 static_cast<int>(position)); |
| 49 } | 51 } |
| 50 | 52 |
| 51 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { | 53 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { |
| 52 RemoveChildView(static_cast<InfoBarView*>(infobar)); | 54 RemoveChildView(static_cast<InfoBarView*>(infobar)); |
| 53 } | 55 } |
| OLD | NEW |