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

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

Issue 7134024: Disable scalling of InfoBar icon (Closed) Base URL: svn://svn.chromium.org/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/tab_contents/infobar.h ('k') | chrome/browser/ui/gtk/infobars/infobar_gtk.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/tab_contents/infobar.h" 5 #include "chrome/browser/tab_contents/infobar.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/tab_contents/infobar_container.h" 10 #include "chrome/browser/tab_contents/infobar_container.h"
(...skipping 16 matching lines...) Expand all
27 static const SkColor kWarningBackgroundColorBottom = 27 static const SkColor kWarningBackgroundColorBottom =
28 SkColorSetRGB(250, 230, 145); 28 SkColorSetRGB(250, 230, 145);
29 // Gray 29 // Gray
30 static const SkColor kPageActionBackgroundColorBottom = 30 static const SkColor kPageActionBackgroundColorBottom =
31 SkColorSetRGB(217, 217, 217); 31 SkColorSetRGB(217, 217, 217);
32 32
33 return (infobar_type == InfoBarDelegate::WARNING_TYPE) ? 33 return (infobar_type == InfoBarDelegate::WARNING_TYPE) ?
34 kWarningBackgroundColorBottom : kPageActionBackgroundColorBottom; 34 kWarningBackgroundColorBottom : kPageActionBackgroundColorBottom;
35 } 35 }
36 36
37 int GetInfoBarIconSizePixels() {
Peter Kasting 2011/06/08 20:33:43 Why are you using a function instead of a constant
sail 2011/06/08 20:35:13 does this look ok? extern const int kInfoBarIco
38 return 32;
39 }
40
37 #if defined(TOOLKIT_VIEWS) // TODO(pkasting): Port non-views to use this. 41 #if defined(TOOLKIT_VIEWS) // TODO(pkasting): Port non-views to use this.
38 42
39 InfoBar::InfoBar(TabContentsWrapper* owner, InfoBarDelegate* delegate) 43 InfoBar::InfoBar(TabContentsWrapper* owner, InfoBarDelegate* delegate)
40 : owner_(owner), 44 : owner_(owner),
41 delegate_(delegate), 45 delegate_(delegate),
42 container_(NULL), 46 container_(NULL),
43 ALLOW_THIS_IN_INITIALIZER_LIST(animation_(new ui::SlideAnimation(this))), 47 ALLOW_THIS_IN_INITIALIZER_LIST(animation_(new ui::SlideAnimation(this))),
44 arrow_height_(0), 48 arrow_height_(0),
45 arrow_target_height_(kDefaultArrowTargetHeight), 49 arrow_target_height_(kDefaultArrowTargetHeight),
46 arrow_half_width_(0), 50 arrow_half_width_(0),
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 container_->RemoveInfoBar(this); 167 container_->RemoveInfoBar(this);
164 // Note that we only tell the delegate we're closed here, and not when we're 168 // Note that we only tell the delegate we're closed here, and not when we're
165 // simply destroyed (by virtue of a tab switch or being moved from window to 169 // simply destroyed (by virtue of a tab switch or being moved from window to
166 // window), since this action can cause the delegate to destroy itself. 170 // window), since this action can cause the delegate to destroy itself.
167 delegate_->InfoBarClosed(); 171 delegate_->InfoBarClosed();
168 delegate_ = NULL; 172 delegate_ = NULL;
169 } 173 }
170 } 174 }
171 175
172 #endif // TOOLKIT_VIEWS 176 #endif // TOOLKIT_VIEWS
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/infobar.h ('k') | chrome/browser/ui/gtk/infobars/infobar_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698