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

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

Issue 1800373002: [MD] replace infobar bottom solid line separator with a shadow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | ui/gfx/skia_util.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "ui/base/material_design/material_design_controller.h" 8 #include "ui/base/material_design/material_design_controller.h"
9 #include "ui/gfx/animation/slide_animation.h" 9 #include "ui/gfx/animation/slide_animation.h"
10 10
11 #if defined(TOOLKIT_VIEWS) 11 #if defined(TOOLKIT_VIEWS)
12 #include "ui/views/window/non_client_view.h" 12 #include "ui/views/window/non_client_view.h"
13 #endif 13 #endif
14 14
15 // static 15 // static
16 #if defined(OS_MACOSX) 16 #if defined(OS_MACOSX)
17 const int InfoBarContainerDelegate::kSeparatorLineHeight = 1; 17 const int InfoBarContainerDelegate::kSeparatorLineHeight = 1;
18 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 11; 18 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 11;
19 #elif defined(TOOLKIT_VIEWS) 19 #elif defined(TOOLKIT_VIEWS)
20 // Views comes second until the Mac browser is Views-based. 20 // Views comes second until the Mac browser is Views-based.
21 const int InfoBarContainerDelegate::kSeparatorLineHeight = 21 const int InfoBarContainerDelegate::kSeparatorLineHeight =
22 views::NonClientFrameView::kClientEdgeThickness; 22 views::NonClientFrameView::kClientEdgeThickness;
23 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 9; 23 const int InfoBarContainerDelegate::kDefaultArrowTargetHeight = 9;
24 #endif 24 #endif
25 25
26 const int InfoBarContainerDelegate::kDefaultBarTargetHeight = 36; 26 const int InfoBarContainerDelegate::kDefaultBarTargetHeight = 36;
27 const int InfoBarContainerDelegate::kDefaultBarTargetHeightMd = 40; 27 const int InfoBarContainerDelegate::kDefaultBarTargetHeightMd = 39;
28 const int InfoBarContainerDelegate::kMaximumArrowTargetHeight = 24; 28 const int InfoBarContainerDelegate::kMaximumArrowTargetHeight = 24;
29 const int InfoBarContainerDelegate::kDefaultArrowTargetHalfWidth = 29 const int InfoBarContainerDelegate::kDefaultArrowTargetHalfWidth =
30 kDefaultArrowTargetHeight; 30 kDefaultArrowTargetHeight;
31 const int InfoBarContainerDelegate::kMaximumArrowTargetHalfWidth = 14; 31 const int InfoBarContainerDelegate::kMaximumArrowTargetHalfWidth = 14;
32 32
33 InfoBarContainerDelegate::InfoBarContainerDelegate() 33 InfoBarContainerDelegate::InfoBarContainerDelegate()
34 : top_arrow_target_height_(kDefaultArrowTargetHeight) { 34 : top_arrow_target_height_(kDefaultArrowTargetHeight) {
35 } 35 }
36 36
37 InfoBarContainerDelegate::~InfoBarContainerDelegate() { 37 InfoBarContainerDelegate::~InfoBarContainerDelegate() {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 if (*arrow_height) 98 if (*arrow_height)
99 *arrow_height += kSeparatorLineHeight; 99 *arrow_height += kSeparatorLineHeight;
100 100
101 int target_height = bar_target_height != -1 101 int target_height = bar_target_height != -1
102 ? bar_target_height 102 ? bar_target_height
103 : ui::MaterialDesignController::IsModeMaterial() 103 : ui::MaterialDesignController::IsModeMaterial()
104 ? kDefaultBarTargetHeightMd 104 ? kDefaultBarTargetHeightMd
105 : kDefaultBarTargetHeight; 105 : kDefaultBarTargetHeight;
106 *bar_height = animation.CurrentValueBetween(0, target_height); 106 *bar_height = animation.CurrentValueBetween(0, target_height);
107 } 107 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/browser_view.cc » ('j') | ui/gfx/skia_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698