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

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: 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
« no previous file with comments | « components/infobars/core/infobar.h ('k') | components/infobars/core/infobar_container.h » ('j') | 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/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 namespace infobars {
16
15 InfoBar::InfoBar(scoped_ptr<InfoBarDelegate> delegate) 17 InfoBar::InfoBar(scoped_ptr<InfoBarDelegate> delegate)
16 : owner_(NULL), 18 : owner_(NULL),
17 delegate_(delegate.Pass()), 19 delegate_(delegate.Pass()),
18 container_(NULL), 20 container_(NULL),
19 animation_(this), 21 animation_(this),
20 arrow_height_(0), 22 arrow_height_(0),
21 arrow_target_height_(kDefaultArrowTargetHeight), 23 arrow_target_height_(kDefaultArrowTargetHeight),
22 arrow_half_width_(0), 24 arrow_half_width_(0),
23 bar_height_(0), 25 bar_height_(0),
24 bar_target_height_(kDefaultBarTargetHeight) { 26 bar_target_height_(kDefaultBarTargetHeight) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 container_->OnInfoBarStateChanged(animation_.is_animating()); 168 container_->OnInfoBarStateChanged(animation_.is_animating());
167 } 169 }
168 170
169 void InfoBar::MaybeDelete() { 171 void InfoBar::MaybeDelete() {
170 if (!owner_ && (animation_.GetCurrentValue() == 0.0)) { 172 if (!owner_ && (animation_.GetCurrentValue() == 0.0)) {
171 if (container_) 173 if (container_)
172 container_->RemoveInfoBar(this); 174 container_->RemoveInfoBar(this);
173 delete this; 175 delete this;
174 } 176 }
175 } 177 }
178
179 } // namespace infobars
OLDNEW
« no previous file with comments | « components/infobars/core/infobar.h ('k') | components/infobars/core/infobar_container.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698