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

Side by Side Diff: chrome/browser/ui/infobar_container_delegate.cc

Issue 801753002: infobars: Fix static initializer created in r308046. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/infobar_container_delegate.h" 5 #include "chrome/browser/ui/infobar_container_delegate.h"
6 #include "ui/gfx/animation/slide_animation.h" 6 #include "ui/gfx/animation/slide_animation.h"
7 7
8 #if defined(TOOLKIT_VIEWS)
9 #include "ui/views/window/non_client_view.h"
10 #endif
11
12 // static
13 #if defined(TOOLKIT_VIEWS)
14 // Views comes first since Mac may eventually be Views-based.
15 const int InfoBarContainerDelegate::kSeparatorLineHeight =
16 views::NonClientFrameView::kClientEdgeThickness;
17 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 9;
18 #elif defined(OS_MACOSX)
19 const int InfoBarContainerDelegate::kSeparatorLineHeight = 1;
20 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 11;
21 #endif
22
8 const int InfoBarContainerDelegate::kDefaultBarTargetHeight = 36; 23 const int InfoBarContainerDelegate::kDefaultBarTargetHeight = 36;
9 const int InfoBarContainerDelegate::kMaximumArrowTargetHeight = 24; 24 const int InfoBarContainerDelegate::kMaximumArrowTargetHeight = 24;
10 const int InfoBarContainerDelegate::kDefaultArrowTargetHalfWidth = 25 const int InfoBarContainerDelegate::kDefaultArrowTargetHalfWidth =
11 kDefaultArrowTargetHeight; 26 kDefaultArrowTargetHeight;
12 const int InfoBarContainerDelegate::kMaximumArrowTargetHalfWidth = 14; 27 const int InfoBarContainerDelegate::kMaximumArrowTargetHalfWidth = 14;
13 28
14 InfoBarContainerDelegate::InfoBarContainerDelegate() 29 InfoBarContainerDelegate::InfoBarContainerDelegate()
15 : top_arrow_target_height_(kDefaultArrowTargetHeight) { 30 : top_arrow_target_height_(kDefaultArrowTargetHeight) {
16 } 31 }
17 32
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // this, changing the arrow height from 0 to kSeparatorLineHeight would 91 // this, changing the arrow height from 0 to kSeparatorLineHeight would
77 // produce no visible effect, because the stroke would paint atop the divider 92 // produce no visible effect, because the stroke would paint atop the divider
78 // line above the infobar. 93 // line above the infobar.
79 if (*arrow_height) 94 if (*arrow_height)
80 *arrow_height += kSeparatorLineHeight; 95 *arrow_height += kSeparatorLineHeight;
81 96
82 *bar_height = animation.CurrentValueBetween( 97 *bar_height = animation.CurrentValueBetween(
83 0, 98 0,
84 (bar_target_height == -1) ? kDefaultBarTargetHeight : bar_target_height); 99 (bar_target_height == -1) ? kDefaultBarTargetHeight : bar_target_height);
85 } 100 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/infobars/infobar_container_cocoa.mm ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698