 Chromium Code Reviews
 Chromium Code Reviews| Index: chrome/browser/ui/views/frame/webapp_header_painter_ash.h | 
| diff --git a/chrome/browser/ui/views/frame/webapp_header_painter_ash.h b/chrome/browser/ui/views/frame/webapp_header_painter_ash.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..66a2ac6dc7093374847282773a4d7212c1bbd79e | 
| --- /dev/null | 
| +++ b/chrome/browser/ui/views/frame/webapp_header_painter_ash.h | 
| @@ -0,0 +1,42 @@ | 
| +// Copyright 2014 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_WEBAPP_HEADER_PAINTER_ASH_H_ | 
| +#define CHROME_BROWSER_UI_VIEWS_FRAME_WEBAPP_HEADER_PAINTER_ASH_H_ | 
| + | 
| +#include "ash/frame/default_header_painter.h" | 
| + | 
| +namespace views { | 
| +class View; | 
| +class Widget; | 
| +} | 
| + | 
| +namespace ash { | 
| +class FrameCaptionButton; | 
| +class FrameCaptionButtonContainerView; | 
| +} | 
| 
calamity
2014/08/06 07:07:07
nit: Move this above the views namespace.
 
benwells
2014/08/06 08:13:59
Done.
 | 
| + | 
| +// Helper class for painting the WebApp style window header. | 
| +class WebAppHeaderPainterAsh : public ash::DefaultHeaderPainter { | 
| + public: | 
| + WebAppHeaderPainterAsh(); | 
| + virtual ~WebAppHeaderPainterAsh(); | 
| + | 
| + // DefaultHeaderPainter does not take ownership of any of the parameters. | 
| 
calamity
2014/08/06 07:07:07
nit: // WebAppHeaderPainterAsh does not take owner
 
benwells
2014/08/06 08:13:59
Done.
 | 
| + void Init(views::Widget* frame, | 
| + views::View* header_view, | 
| + ash::FrameCaptionButton* back_button, | 
| + ash::FrameCaptionButtonContainerView* caption_button_container); | 
| 
calamity
2014/08/06 07:07:07
It's a bit scary that this name collides with the
 
benwells
2014/08/06 08:13:59
Oh yeah, good catch. Done.
 | 
| + | 
| + private: | 
| + // DefaultHeaderPainter overrides: | 
| + virtual void LayoutHeader() OVERRIDE; | 
| + virtual views::View* GetViewToLeftOfTitle() const OVERRIDE; | 
| + | 
| + ash::FrameCaptionButton* back_button_; | 
| + | 
| + DISALLOW_COPY_AND_ASSIGN(WebAppHeaderPainterAsh); | 
| +}; | 
| + | 
| +#endif // CHROME_BROWSER_UI_VIEWS_FRAME_WEBAPP_HEADER_PAINTER_ASH_H_ |