Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_container_view.cc

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix nib name on mac Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
11 #include "ui/base/l10n/l10n_util.h" 11 #include "ui/base/l10n/l10n_util.h"
12 12
13 // static 13 // static
14 const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView"; 14 const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView";
15 15
16 InfoBarContainerView::InfoBarContainerView(Delegate* delegate) 16 InfoBarContainerView::InfoBarContainerView(Delegate* delegate)
17 : InfoBarContainer(delegate) { 17 : infobars::InfoBarContainer(delegate) {
18 set_id(VIEW_ID_INFO_BAR_CONTAINER); 18 set_id(VIEW_ID_INFO_BAR_CONTAINER);
19 } 19 }
20 20
21 InfoBarContainerView::~InfoBarContainerView() { 21 InfoBarContainerView::~InfoBarContainerView() {
22 RemoveAllInfoBarsForDestruction(); 22 RemoveAllInfoBarsForDestruction();
23 } 23 }
24 24
25 gfx::Size InfoBarContainerView::GetPreferredSize() { 25 gfx::Size InfoBarContainerView::GetPreferredSize() {
26 int total_height; 26 int total_height;
27 GetVerticalOverlap(&total_height); 27 GetVerticalOverlap(&total_height);
(...skipping 17 matching lines...) Expand all
45 child->SetBounds(0, top, width(), child_height); 45 child->SetBounds(0, top, width(), child_height);
46 top += child_height; 46 top += child_height;
47 } 47 }
48 } 48 }
49 49
50 void InfoBarContainerView::GetAccessibleState(ui::AXViewState* state) { 50 void InfoBarContainerView::GetAccessibleState(ui::AXViewState* state) {
51 state->role = ui::AX_ROLE_GROUP; 51 state->role = ui::AX_ROLE_GROUP;
52 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_INFOBAR_CONTAINER); 52 state->name = l10n_util::GetStringUTF16(IDS_ACCNAME_INFOBAR_CONTAINER);
53 } 53 }
54 54
55 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar, 55 void InfoBarContainerView::PlatformSpecificAddInfoBar(
56 size_t position) { 56 infobars::InfoBar* infobar,
57 size_t position) {
57 AddChildViewAt(static_cast<InfoBarView*>(infobar), 58 AddChildViewAt(static_cast<InfoBarView*>(infobar),
58 static_cast<int>(position)); 59 static_cast<int>(position));
59 } 60 }
60 61
61 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { 62 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(
63 infobars::InfoBar* infobar) {
62 RemoveChildView(static_cast<InfoBarView*>(infobar)); 64 RemoveChildView(static_cast<InfoBarView*>(infobar));
63 } 65 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.h ('k') | chrome/browser/ui/views/infobars/infobar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698