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

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: move path calc 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 side-by-side diff with in-line comments
Download patch
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 d7f97bb9c3790c614b53bfd907bbad7e61ae53ca..b89bdc4b2c916983ba38eb554d53dade56c8844a 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
@@ -179,8 +185,6 @@ void InfoBarView::Layout() {
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));
@@ -327,12 +331,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) {

Powered by Google App Engine
This is Rietveld 408576698