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

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

Issue 7046080: When replacing an infobar, maintain the old infobar's position. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 6 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
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/base/accessibility/accessible_view_state.h" 10 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 26 matching lines...) Expand all
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_container_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698