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

Unified Diff: chrome/browser/ui/views/infobars/infobar_view.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/infobars/infobar_view.cc
diff --git a/chrome/browser/ui/views/infobars/infobar_view.cc b/chrome/browser/ui/views/infobars/infobar_view.cc
index 7bf133fd114b2b34b755ce42d252095765a88cb3..d0b78c305e05fee44ef0e14e78280c42632edc7a 100644
--- a/chrome/browser/ui/views/infobars/infobar_view.cc
+++ b/chrome/browser/ui/views/infobars/infobar_view.cc
@@ -102,6 +102,12 @@ InfoBarView::InfoBarView(scoped_ptr<infobars::InfoBarDelegate> delegate)
}
}
+const infobars::InfoBarContainer::Delegate* InfoBarView::container_delegate()
+ const {
+ const infobars::InfoBarContainer* infobar_container = container();
+ return infobar_container ? infobar_container->delegate() : NULL;
+}
+
InfoBarView::~InfoBarView() {
// We should have closed any open menus in PlatformSpecificHide(), then
// subclasses' RunMenu() functions should have prevented opening any new ones
@@ -180,12 +186,11 @@ void InfoBarView::Layout() {
// Calculate the fill and stroke paths. We do this here, rather than in
// PlatformSpecificRecalculateHeight(), because this is also reached when our
// width is changed, which affects both paths.
+ // TODO(estade): these paths aren't used for MD; remove when MD is default.
stroke_path_.rewind();
fill_path_.rewind();
const infobars::InfoBarContainer::Delegate* delegate = container_delegate();
if (delegate) {
- static_cast<InfoBarBackground*>(background())->set_separator_color(
- delegate->GetInfoBarSeparatorColor());
int arrow_x;
SkScalar arrow_fill_height = SkIntToScalar(std::max(
arrow_height() - InfoBarContainerDelegate::kSeparatorLineHeight, 0));
@@ -332,12 +337,6 @@ int InfoBarView::OffsetY(views::View* view) const {
(bar_target_height() - bar_height());
}
-const infobars::InfoBarContainer::Delegate* InfoBarView::container_delegate()
- const {
- const infobars::InfoBarContainer* infobar_container = container();
- return infobar_container ? infobar_container->delegate() : NULL;
-}
-
void InfoBarView::RunMenuAt(ui::MenuModel* menu_model,
views::MenuButton* button,
views::MenuAnchorPosition anchor) {
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698