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

Side by Side Diff: components/infobars/core/infobar.cc

Issue 240193003: Move Infobars core files to the Infobars component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 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/infobars/infobar.h" 5 #include "components/infobars/core/infobar.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "chrome/browser/infobars/infobar_container.h" 11 #include "components/infobars/core/infobar_container.h"
12 #include "chrome/browser/infobars/infobar_manager.h" 12 #include "components/infobars/core/infobar_manager.h"
13 #include "ui/gfx/animation/slide_animation.h" 13 #include "ui/gfx/animation/slide_animation.h"
14 14
15 InfoBar::InfoBar(scoped_ptr<InfoBarDelegate> delegate) 15 InfoBar::InfoBar(scoped_ptr<InfoBarDelegate> delegate)
16 : owner_(NULL), 16 : owner_(NULL),
17 delegate_(delegate.Pass()), 17 delegate_(delegate.Pass()),
18 container_(NULL), 18 container_(NULL),
19 animation_(this), 19 animation_(this),
20 arrow_height_(0), 20 arrow_height_(0),
21 arrow_target_height_(kDefaultArrowTargetHeight), 21 arrow_target_height_(kDefaultArrowTargetHeight),
22 arrow_half_width_(0), 22 arrow_half_width_(0),
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 container_->OnInfoBarStateChanged(animation_.is_animating()); 166 container_->OnInfoBarStateChanged(animation_.is_animating());
167 } 167 }
168 168
169 void InfoBar::MaybeDelete() { 169 void InfoBar::MaybeDelete() {
170 if (!owner_ && (animation_.GetCurrentValue() == 0.0)) { 170 if (!owner_ && (animation_.GetCurrentValue() == 0.0)) {
171 if (container_) 171 if (container_)
172 container_->RemoveInfoBar(this); 172 container_->RemoveInfoBar(this);
173 delete this; 173 delete this;
174 } 174 }
175 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698