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 "base/message_loop/message_loop.h" | |
8 #include "chrome/browser/ui/view_ids.h" | 7 #include "chrome/browser/ui/view_ids.h" |
9 #include "chrome/browser/ui/views/infobars/infobar_view.h" | 8 #include "chrome/browser/ui/views/infobars/infobar_view.h" |
10 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
11 #include "ui/base/accessibility/accessible_view_state.h" | 10 #include "ui/base/accessibility/accessible_view_state.h" |
12 #include "ui/base/l10n/l10n_util.h" | 11 #include "ui/base/l10n/l10n_util.h" |
13 | 12 |
14 // static | 13 // static |
15 const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView"; | 14 const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView"; |
16 | 15 |
17 InfoBarContainerView::InfoBarContainerView(Delegate* delegate) | 16 InfoBarContainerView::InfoBarContainerView(Delegate* delegate) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 52 } |
54 | 53 |
55 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar, | 54 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar, |
56 size_t position) { | 55 size_t position) { |
57 AddChildViewAt(static_cast<InfoBarView*>(infobar), | 56 AddChildViewAt(static_cast<InfoBarView*>(infobar), |
58 static_cast<int>(position)); | 57 static_cast<int>(position)); |
59 } | 58 } |
60 | 59 |
61 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { | 60 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { |
62 RemoveChildView(static_cast<InfoBarView*>(infobar)); | 61 RemoveChildView(static_cast<InfoBarView*>(infobar)); |
63 base::MessageLoop::current()->DeleteSoon(FROM_HERE, infobar); | |
64 } | 62 } |
OLD | NEW |