diff options
author | estade <estade@chromium.org> | 2016-03-01 18:03:32 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-02 02:04:42 +0000 |
commit | c26c0f3e2df970d98800ea151efc00e7d22fc3c8 (patch) | |
tree | 2c3cfdd3d9097af4d3a384076a8c9e966713b38a /chrome/browser/ui/views/frame/browser_header_painter_ash.h | |
parent | c5656532d43869dab92268b04fdc4d57f8a96c88 (diff) | |
download | chromium_src-c26c0f3e2df970d98800ea151efc00e7d22fc3c8.zip chromium_src-c26c0f3e2df970d98800ea151efc00e7d22fc3c8.tar.gz chromium_src-c26c0f3e2df970d98800ea151efc00e7d22fc3c8.tar.bz2 |
[MD] [Win/Linux] Paint opaque frames without bg asset
For MD this gets rid of the subtle gradient that was present in pre-MD and fixes
incognito frame rendering.
This also shares more code with CrOS.
BUG=584386
Review URL: https://codereview.chromium.org/1737803002
Cr-Commit-Position: refs/heads/master@{#378648}
Diffstat (limited to 'chrome/browser/ui/views/frame/browser_header_painter_ash.h')
-rw-r--r-- | chrome/browser/ui/views/frame/browser_header_painter_ash.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/chrome/browser/ui/views/frame/browser_header_painter_ash.h b/chrome/browser/ui/views/frame/browser_header_painter_ash.h index 04ed84c..f1fea7a 100644 --- a/chrome/browser/ui/views/frame/browser_header_painter_ash.h +++ b/chrome/browser/ui/views/frame/browser_header_painter_ash.h @@ -12,6 +12,7 @@ #include "third_party/skia/include/core/SkColor.h" #include "ui/gfx/animation/animation_delegate.h" +class BrowserNonClientFrameViewAsh; class BrowserView; namespace ash { @@ -36,12 +37,11 @@ class BrowserHeaderPainterAsh : public ash::HeaderPainter, ~BrowserHeaderPainterAsh() override; // BrowserHeaderPainterAsh does not take ownership of any of the parameters. - void Init( - views::Widget* frame, - BrowserView* browser_view, - views::View* header_view, - views::View* window_icon, - ash::FrameCaptionButtonContainerView* caption_button_container); + void Init(views::Widget* frame, + BrowserView* browser_view, + BrowserNonClientFrameViewAsh* header_view, + views::View* window_icon, + ash::FrameCaptionButtonContainerView* caption_button_container); // ash::HeaderPainter overrides: int GetMinimumHeaderWidth() const override; @@ -56,24 +56,16 @@ class BrowserHeaderPainterAsh : public ash::HeaderPainter, // gfx::AnimationDelegate override: void AnimationProgressed(const gfx::Animation* animation) override; + // Paints the frame image for the |active| state based on the current value of + // the activation animation. + void PaintFrameImages(gfx::Canvas* canvas, bool active); + // Paints highlight around the edge of the header for restored windows. void PaintHighlightForRestoredWindow(gfx::Canvas* canvas); // Paints the title bar, primarily the title string. void PaintTitleBar(gfx::Canvas* canvas); - // Gets the base image to paint for the frame. This may be null, in which case - // GetFrameColor() should be used instead. - gfx::ImageSkia GetFrameImage(Mode mode) const; - - // Gets the overlay image to paint on top of the base image. This may be null, - // in which case nothing will be drawn. - gfx::ImageSkia GetFrameOverlayImage(Mode mode) const; - - // Gets the color to use to paint the frame (when GetFrameImage() returns - // a null image). - SkColor GetFrameColor(Mode mode) const; - // Updates the size and icons used for the minimize, restore, and close // buttons. void UpdateCaptionButtons(); @@ -95,7 +87,7 @@ class BrowserHeaderPainterAsh : public ash::HeaderPainter, bool is_incognito_; // The header view. - views::View* view_; + BrowserNonClientFrameViewAsh* view_; views::View* window_icon_; ash::FrameCaptionButtonContainerView* caption_button_container_; |