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

Side by Side Diff: chrome/browser/ui/views/infobars/infobar_background.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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_
6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ 6 #define CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "components/infobars/core/infobar_delegate.h" 10 #include "components/infobars/core/infobar_delegate.h"
11 #include "ui/views/background.h" 11 #include "ui/views/background.h"
12 12
13 class InfoBarBackground : public views::Background { 13 class InfoBarBackground : public views::Background {
14 public: 14 public:
15 explicit InfoBarBackground(infobars::InfoBarDelegate::Type infobar_type); 15 explicit InfoBarBackground(infobars::InfoBarDelegate::Type infobar_type);
16 ~InfoBarBackground() override; 16 ~InfoBarBackground() override;
17 17
18 void set_separator_color(SkColor color) { separator_color_ = color; }
19
20 private: 18 private:
21 // views::Background: 19 // views::Background:
22 void Paint(gfx::Canvas* canvas, views::View* view) const override; 20 void Paint(gfx::Canvas* canvas, views::View* view) const override;
23 21
24 SkColor separator_color_; 22 void PaintMd(gfx::Canvas* canvas, views::View* view) const;
23
25 SkColor top_color_; 24 SkColor top_color_;
26 SkColor bottom_color_; 25 SkColor bottom_color_;
27 26
28 DISALLOW_COPY_AND_ASSIGN(InfoBarBackground); 27 DISALLOW_COPY_AND_ASSIGN(InfoBarBackground);
29 }; 28 };
30 29
31 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_ 30 #endif // CHROME_BROWSER_UI_VIEWS_INFOBARS_INFOBAR_BACKGROUND_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/infobar_container_delegate.cc ('k') | chrome/browser/ui/views/infobars/infobar_background.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698