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" |
11 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
12 | 12 |
13 InfoBarContainerView::InfoBarContainerView(Delegate* delegate) | 13 InfoBarContainerView::InfoBarContainerView(Delegate* delegate) |
14 : InfoBarContainer(delegate) { | 14 : InfoBarContainer(delegate) { |
15 SetID(VIEW_ID_INFO_BAR_CONTAINER); | 15 set_id(VIEW_ID_INFO_BAR_CONTAINER); |
16 } | 16 } |
17 | 17 |
18 InfoBarContainerView::~InfoBarContainerView() { | 18 InfoBarContainerView::~InfoBarContainerView() { |
19 RemoveAllInfoBarsForDestruction(); | 19 RemoveAllInfoBarsForDestruction(); |
20 } | 20 } |
21 | 21 |
22 gfx::Size InfoBarContainerView::GetPreferredSize() { | 22 gfx::Size InfoBarContainerView::GetPreferredSize() { |
23 // We do not have a preferred width (we will expand to fit the available width | 23 // We do not have a preferred width (we will expand to fit the available width |
24 // of the delegate). | 24 // of the delegate). |
25 int total_height; | 25 int total_height; |
(...skipping 18 matching lines...) Expand all Loading... |
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 AddChildView(static_cast<InfoBarView*>(infobar)); |
49 } | 49 } |
50 | 50 |
51 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { | 51 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { |
52 RemoveChildView(static_cast<InfoBarView*>(infobar)); | 52 RemoveChildView(static_cast<InfoBarView*>(infobar)); |
53 } | 53 } |
OLD | NEW |