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

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

Issue 12036075: alternate ntp: fix website page jankiness when suggestions show and top bars are hidden (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove redundant param Created 7 years, 11 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 "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/ui/view_ids.h" 8 #include "chrome/browser/ui/view_ids.h"
9 #include "chrome/browser/ui/views/infobars/infobar_view.h" 9 #include "chrome/browser/ui/views/infobars/infobar_view.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
11 #include "ui/base/accessibility/accessible_view_state.h" 11 #include "ui/base/accessibility/accessible_view_state.h"
12 #include "ui/base/l10n/l10n_util.h" 12 #include "ui/base/l10n/l10n_util.h"
13 13
14 // static 14 // static
15 const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView"; 15 const char InfoBarContainerView::kViewClassName[] = "InfoBarContainerView";
16 16
17 InfoBarContainerView::InfoBarContainerView( 17 InfoBarContainerView::InfoBarContainerView(
18 Delegate* delegate, 18 Delegate* delegate,
19 chrome::search::SearchModel* search_model) 19 chrome::search::SearchModel* search_model,
20 : InfoBarContainer(delegate, search_model) { 20 const InstantModel* instant_model)
21 : InfoBarContainer(delegate, search_model, instant_model) {
21 set_id(VIEW_ID_INFO_BAR_CONTAINER); 22 set_id(VIEW_ID_INFO_BAR_CONTAINER);
22 } 23 }
23 24
24 InfoBarContainerView::~InfoBarContainerView() { 25 InfoBarContainerView::~InfoBarContainerView() {
25 RemoveAllInfoBarsForDestruction(); 26 RemoveAllInfoBarsForDestruction();
26 } 27 }
27 28
28 gfx::Size InfoBarContainerView::GetPreferredSize() { 29 gfx::Size InfoBarContainerView::GetPreferredSize() {
29 // We do not have a preferred width (we will expand to fit the available width 30 // We do not have a preferred width (we will expand to fit the available width
30 // of the delegate). 31 // of the delegate).
(...skipping 26 matching lines...) Expand all
57 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar, 58 void InfoBarContainerView::PlatformSpecificAddInfoBar(InfoBar* infobar,
58 size_t position) { 59 size_t position) {
59 AddChildViewAt(static_cast<InfoBarView*>(infobar), 60 AddChildViewAt(static_cast<InfoBarView*>(infobar),
60 static_cast<int>(position)); 61 static_cast<int>(position));
61 } 62 }
62 63
63 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) { 64 void InfoBarContainerView::PlatformSpecificRemoveInfoBar(InfoBar* infobar) {
64 RemoveChildView(static_cast<InfoBarView*>(infobar)); 65 RemoveChildView(static_cast<InfoBarView*>(infobar));
65 MessageLoop::current()->DeleteSoon(FROM_HERE, infobar); 66 MessageLoop::current()->DeleteSoon(FROM_HERE, infobar);
66 } 67 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698