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

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

Issue 1826653002: Draw infobar arrow border with width of 1px on any scale factor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/infobar_container_delegate.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 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 #ifndef CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_
6 #define CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/infobars/core/infobar_container.h" 11 #include "components/infobars/core/infobar_container.h"
12 12
13 class InfoBarContainerDelegate : public infobars::InfoBarContainer::Delegate { 13 class InfoBarContainerDelegate : public infobars::InfoBarContainer::Delegate {
14 public: 14 public:
15 // TODO(estade): make some or all of these private.
15 static const int kDefaultBarTargetHeight; 16 static const int kDefaultBarTargetHeight;
16 static const int kDefaultBarTargetHeightMd; 17 static const int kDefaultBarTargetHeightMd;
17 static const int kSeparatorLineHeight; 18 static const int kSeparatorLineHeight;
18 static const int kDefaultArrowTargetHeight; 19 static const int kDefaultArrowTargetHeight;
20 static const int kDefaultArrowTargetHeightMd;
19 static const int kMaximumArrowTargetHeight; 21 static const int kMaximumArrowTargetHeight;
20 static const int kDefaultArrowTargetHalfWidth; 22 static const int kDefaultArrowTargetHalfWidth;
23 static const int kDefaultArrowTargetHalfWidthMd;
21 static const int kMaximumArrowTargetHalfWidth; 24 static const int kMaximumArrowTargetHalfWidth;
22 25
23 InfoBarContainerDelegate(); 26 InfoBarContainerDelegate();
24 ~InfoBarContainerDelegate() override; 27 ~InfoBarContainerDelegate() override;
25 28
26 // Called when the distance between what the top infobar's "unspoofable" arrow 29 // Called when the distance between what the top infobar's "unspoofable" arrow
27 // would point to and the top infobar itself changes. Sets the maximum height 30 // would point to and the top infobar itself changes. Sets the maximum height
28 // of the top arrow to the new |height| and asks |container| to update its 31 // of the top arrow to the new |height| and asks |container| to update its
29 // infobars accordingly. This enables the top infobar to show a longer arrow 32 // infobars accordingly. This enables the top infobar to show a longer arrow
30 // (e.g. because of a visible bookmark bar) or shorter (e.g. due to being in a 33 // (e.g. because of a visible bookmark bar) or shorter (e.g. due to being in a
(...skipping 11 matching lines...) Expand all
42 int* arrow_half_width, 45 int* arrow_half_width,
43 int* bar_height) const override; 46 int* bar_height) const override;
44 47
45 private: 48 private:
46 int top_arrow_target_height_; 49 int top_arrow_target_height_;
47 50
48 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerDelegate); 51 DISALLOW_COPY_AND_ASSIGN(InfoBarContainerDelegate);
49 }; 52 };
50 53
51 #endif // CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_ 54 #endif // CHROME_BROWSER_UI_INFOBAR_CONTAINER_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/infobar_container_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698