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

Side by Side Diff: chrome/browser/infobars/infobar.cc

Issue 10843071: Create chrome/browser/api directory. Move infobar delegates used by Autofill to the directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 4 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/infobars/infobar.h ('k') | chrome/browser/infobars/infobar_container.cc » ('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 "chrome/browser/infobars/infobar.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h"
9 #include "build/build_config.h" 10 #include "build/build_config.h"
10 #include "base/logging.h"
11 #include "chrome/browser/infobars/infobar_container.h" 11 #include "chrome/browser/infobars/infobar_container.h"
12 #include "chrome/browser/infobars/infobar_tab_helper.h" 12 #include "chrome/browser/infobars/infobar_tab_helper.h"
13 #include "ui/base/animation/slide_animation.h" 13 #include "ui/base/animation/slide_animation.h"
14 14
15 SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type) { 15 SkColor GetInfoBarTopColor(InfoBarDelegate::Type infobar_type) {
16 // Yellow 16 // Yellow
17 static const SkColor kWarningBackgroundColorTop = 17 static const SkColor kWarningBackgroundColorTop =
18 SkColorSetRGB(255, 242, 183); 18 SkColorSetRGB(255, 242, 183);
19 // Gray 19 // Gray
20 static const SkColor kPageActionBackgroundColorTop = 20 static const SkColor kPageActionBackgroundColorTop =
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void InfoBar::MaybeDelete() { 182 void InfoBar::MaybeDelete() {
183 if (!owner_ && delegate_ && (animation_.GetCurrentValue() == 0.0)) { 183 if (!owner_ && delegate_ && (animation_.GetCurrentValue() == 0.0)) {
184 if (container_) 184 if (container_)
185 container_->RemoveInfoBar(this); 185 container_->RemoveInfoBar(this);
186 delegate_->InfoBarClosed(); 186 delegate_->InfoBarClosed();
187 delegate_ = NULL; 187 delegate_ = NULL;
188 } 188 }
189 } 189 }
190 190
191 #endif // TOOLKIT_VIEWS || TOOLKIT_GTK 191 #endif // TOOLKIT_VIEWS || TOOLKIT_GTK
OLDNEW
« no previous file with comments | « chrome/browser/infobars/infobar.h ('k') | chrome/browser/infobars/infobar_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698